From patchwork Mon Oct 18 17:38:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 262701 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9IJAR6f022413 for ; Mon, 18 Oct 2010 19:10:48 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DC6399EC0F for ; Mon, 18 Oct 2010 12:10:27 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by gabe.freedesktop.org (Postfix) with ESMTP id 65EFB9E927 for ; Mon, 18 Oct 2010 10:38:40 -0700 (PDT) Received: from wuerfel.localnet (port-92-200-213-9.dynamic.qsc.de [92.200.213.9]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0Ltj2f-1OgdYB0YUP-011g6F; Mon, 18 Oct 2010 19:38:30 +0200 From: Arnd Bergmann To: Christoph Hellwig Subject: Re: [v2] Remaining BKL users, what to do Date: Mon, 18 Oct 2010 19:38:26 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.36-rc7-next-20101015+; KDE/4.5.1; x86_64; ; ) References: <201009161632.59210.arnd@arndb.de> <201010181742.06678.arnd@arndb.de> <20101018161924.GA9571@infradead.org> In-Reply-To: <20101018161924.GA9571@infradead.org> MIME-Version: 1.0 Message-Id: <201010181938.27076.arnd@arndb.de> X-Provags-ID: V02:K0:ntn3C7G5536uH5rgMWnLdKqpiPdBxRsP95JcLNhdKR0 Mr4WWEUStt1l8CIvFYSQjcsm/+vNPLqJRwjl2kFNI/qPkebifK BwEO6ynWsbcWJVr+7NByMEQHgFHhEtyBY1bvICfRgKBLXm0nz2 XgX4HRBk8bxvuqKEKRGuWODo8U89Zvn6RJ6wwjxAuHZSlycen2 1+fwyeEruNbjC1ex5HY3g== X-Mailman-Approved-At: Mon, 18 Oct 2010 12:09:07 -0700 Cc: autofs@linux.kernel.org, Jan Harkes , Samuel Ortiz , Jan Kara , Arnaldo Carvalho de Melo , netdev@vger.kernel.org, Anders Larsen , Trond Myklebust , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, codalist@TELEMANN.coda.cs.cmu.edu, ksummit-2010-discuss@lists.linux-foundation.org, Petr Vandrovec , Bryan Schumaker , Mikulas Patocka , linux-fsdevel@vger.kernel.org, Evgeniy Dushistov , Andrew Hendry , David Miller , linux-media@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 18 Oct 2010 19:10:48 +0000 (UTC) diff --git a/fs/Kconfig b/fs/Kconfig index c386a9f..25ce2dc 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -50,7 +50,6 @@ endif # BLOCK config FILE_LOCKING bool "Enable POSIX file locking API" if EMBEDDED default y - select BKL help This option enables standard file locking support, required for filesystems like NFS and for the flock() system diff --git a/fs/locks.c b/fs/locks.c index 8b2b6ad..02b6e0e 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -142,6 +142,7 @@ int lease_break_time = 45; static LIST_HEAD(file_lock_list); static LIST_HEAD(blocked_list); +static DEFINE_SPINLOCK(file_lock_lock); /* * Protects the two list heads above, plus the inode->i_flock list @@ -149,13 +150,13 @@ static LIST_HEAD(blocked_list); */ void lock_flocks(void) { - lock_kernel(); + spin_lock(&file_lock_lock); } EXPORT_SYMBOL_GPL(lock_flocks); void unlock_flocks(void) { - unlock_kernel(); + spin_unlock(&file_lock_lock); } EXPORT_SYMBOL_GPL(unlock_flocks);