From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753220AbbDBJFj (ORCPT ); Thu, 2 Apr 2015 05:05:39 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:51423 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753177AbbDBJFg (ORCPT ); Thu, 2 Apr 2015 05:05:36 -0400 Date: Thu, 2 Apr 2015 02:05:34 -0700 From: Christoph Hellwig To: Markus Pargmann Cc: Jens Axboe , linux-kernel@vger.kernel.org, nbd-general@lists.sourceforge.net, kernel@pengutronix.de Subject: Re: [PATCH 7/9] nbd: Remove fixme that was already fixed Message-ID: <20150402090534.GA8341@infradead.org> References: <1427962301-17085-1-git-send-email-mpa@pengutronix.de> <1427962301-17085-8-git-send-email-mpa@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1427962301-17085-8-git-send-email-mpa@pengutronix.de> User-Agent: Mutt/1.5.23 (2014-03-12) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.