Re: [Nbd] [PATCH 7/9] nbd: Remove fixme that was already fixed
- To: Markus Pargmann <mpa@...1897...>
- Cc: Jens Axboe <axboe@...161...>, nbd-general@lists.sourceforge.net, linux-kernel@...25..., kernel@...1897...
- Subject: Re: [Nbd] [PATCH 7/9] nbd: Remove fixme that was already fixed
- From: Christoph Hellwig <hch@...1270...>
- Date: Thu, 2 Apr 2015 02:05:34 -0700
- Message-id: <20150402090534.GA8341@...1270...>
- In-reply-to: <1427962301-17085-8-git-send-email-mpa@...1897...>
- References: <1427962301-17085-1-git-send-email-mpa@...1897...> <1427962301-17085-8-git-send-email-mpa@...1897...>
On Thu, Apr 02, 2015 at 10:11:39AM +0200, Markus Pargmann wrote:
> +/*
> + * Forcibly shutdown the socket causing all listeners to error
> + */
> static void sock_shutdown(struct nbd_device *nbd, int lock)
> {
> - /* Forcibly shutdown the socket causing all listeners
> - * to error
> - *
> - * FIXME: This code is duplicated from sys_shutdown, but
> - * there should be a more generic interface rather than
> - * calling socket ops directly here */
> if (lock)
> mutex_lock(&nbd->tx_lock);
> if (nbd->sock) {
Please also kill the conditional locking here in a future patch by
moving it into the caller.
Reply to: