From 72f98e72551fad573c6cace8e8551ef094f482dd Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Wed, 27 Oct 2010 21:39:58 +0200 Subject: locks: turn lock_flocks into a spinlock Nothing depends on lock_flocks using the BKL any more, so we can do the switch over to a private spinlock. Signed-off-by: Arnd Bergmann --- fs/locks.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'fs/locks.c') diff --git a/fs/locks.c b/fs/locks.c index 85fd9ce1abae..74c3df99c0e1 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); -- cgit v1.2.2