Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754101Ab0GGCEf (ORCPT ); Tue, 6 Jul 2010 22:04:35 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:50274 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753534Ab0GGCE1 (ORCPT ); Tue, 6 Jul 2010 22:04:27 -0400 Date: Tue, 6 Jul 2010 22:04:25 -0400 From: Christoph Hellwig To: Arnd Bergmann Cc: Jens Axboe , Christoph Hellwig , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, John Kacur , Frederic Weisbecker , linux-scsi@vger.kernel.org Subject: Re: [PATCH 5/6] block: remove BKL from partition code Message-ID: <20100707020425.GG2950@infradead.org> References: <1278193640-24223-1-git-send-email-arnd@arndb.de> <1278193640-24223-6-git-send-email-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1278193640-24223-6-git-send-email-arnd@arndb.de> User-Agent: Mutt/1.5.20 (2009-08-17) 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 Content-Length: 1176 Lines: 29 On Sat, Jul 03, 2010 at 11:47:19PM +0200, Arnd Bergmann wrote: > I don't see any reason why we need the BKL here. > The functions blkdev_get, blkdev_put, blkpg_ioctl > and blkdev_reread_part are the only remaining users > of the big kernel lock in the block layer, and they > all access the same fields of the bdev and gendisk > structures, yet they always do so under the protection > of bdev->bd_mutex. > > The open and close block_device_operations have all > been converted to grab the BKL themselves, where > necessary, so as far I can tell it should be safe > to remove. The content of the patch really does not match the subject at all, which is a rather bad thing. Anyway, dropping from blkdev_reread_part and blkpg_ioctl is easy enough, and fine from a quick audit of the functions. Dropping it from blkdev_get/put also seems fine from a quick glance. But that should be part of pushing the BKL into ->open/release. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/