aboutsummaryrefslogtreecommitdiffstats
path: root/fs/locks.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2010-10-27 15:39:58 -0400
committerArnd Bergmann <arnd@arndb.de>2010-10-27 16:07:36 -0400
commit72f98e72551fad573c6cace8e8551ef094f482dd (patch)
treefeeb5484ee69d3c9a9ef890037361f9ce55a42c4 /fs/locks.c
parentf7347ce4ee7c65415f84be915c018473e7076f31 (diff)
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 <arnd@arndb.de>
Diffstat (limited to 'fs/locks.c')
-rw-r--r--fs/locks.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/locks.c b/fs/locks.c
index 85fd9ce1aba..74c3df99c0e 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -142,6 +142,7 @@ int lease_break_time = 45;
142 142
143static LIST_HEAD(file_lock_list); 143static LIST_HEAD(file_lock_list);
144static LIST_HEAD(blocked_list); 144static LIST_HEAD(blocked_list);
145static DEFINE_SPINLOCK(file_lock_lock);
145 146
146/* 147/*
147 * Protects the two list heads above, plus the inode->i_flock list 148 * Protects the two list heads above, plus the inode->i_flock list
@@ -149,13 +150,13 @@ static LIST_HEAD(blocked_list);
149 */ 150 */
150void lock_flocks(void) 151void lock_flocks(void)
151{ 152{
152 lock_kernel(); 153 spin_lock(&file_lock_lock);
153} 154}
154EXPORT_SYMBOL_GPL(lock_flocks); 155EXPORT_SYMBOL_GPL(lock_flocks);
155 156
156void unlock_flocks(void) 157void unlock_flocks(void)
157{ 158{
158 unlock_kernel(); 159 spin_unlock(&file_lock_lock);
159} 160}
160EXPORT_SYMBOL_GPL(unlock_flocks); 161EXPORT_SYMBOL_GPL(unlock_flocks);
161 162