diff options
author | Jan Blunck <jblunck@infradead.org> | 2010-02-24 07:25:29 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2010-10-04 15:10:35 -0400 |
commit | ba13d597a60a1a26614f18b76c1a2cad1a548e46 (patch) | |
tree | 3b9df6c49beea2fe5ce99ad80cf8d30174b79c67 /fs/bfs | |
parent | 74c41429ae5889933a2b9b9d0d2f687baa410766 (diff) |
BKL: Remove BKL from BFS
The BKL is only used in put_super and fill_super that are both protected by
the superblocks s_umount rw_semaphore. Therefore it is safe to remove the BKL
entirely.
Signed-off-by: Jan Blunck <jblunck@infradead.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'fs/bfs')
-rw-r--r-- | fs/bfs/inode.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c index d2e09363dd93..883e77acd5a8 100644 --- a/fs/bfs/inode.c +++ b/fs/bfs/inode.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
15 | #include <linux/smp_lock.h> | ||
16 | #include <linux/buffer_head.h> | 15 | #include <linux/buffer_head.h> |
17 | #include <linux/vfs.h> | 16 | #include <linux/vfs.h> |
18 | #include <linux/writeback.h> | 17 | #include <linux/writeback.h> |
@@ -215,14 +214,10 @@ static void bfs_put_super(struct super_block *s) | |||
215 | if (!info) | 214 | if (!info) |
216 | return; | 215 | return; |
217 | 216 | ||
218 | lock_kernel(); | ||
219 | |||
220 | mutex_destroy(&info->bfs_lock); | 217 | mutex_destroy(&info->bfs_lock); |
221 | kfree(info->si_imap); | 218 | kfree(info->si_imap); |
222 | kfree(info); | 219 | kfree(info); |
223 | s->s_fs_info = NULL; | 220 | s->s_fs_info = NULL; |
224 | |||
225 | unlock_kernel(); | ||
226 | } | 221 | } |
227 | 222 | ||
228 | static int bfs_statfs(struct dentry *dentry, struct kstatfs *buf) | 223 | static int bfs_statfs(struct dentry *dentry, struct kstatfs *buf) |
@@ -322,13 +317,9 @@ static int bfs_fill_super(struct super_block *s, void *data, int silent) | |||
322 | int ret = -EINVAL; | 317 | int ret = -EINVAL; |
323 | unsigned long i_sblock, i_eblock, i_eoff, s_size; | 318 | unsigned long i_sblock, i_eblock, i_eoff, s_size; |
324 | 319 | ||
325 | lock_kernel(); | ||
326 | |||
327 | info = kzalloc(sizeof(*info), GFP_KERNEL); | 320 | info = kzalloc(sizeof(*info), GFP_KERNEL); |
328 | if (!info) { | 321 | if (!info) |
329 | unlock_kernel(); | ||
330 | return -ENOMEM; | 322 | return -ENOMEM; |
331 | } | ||
332 | mutex_init(&info->bfs_lock); | 323 | mutex_init(&info->bfs_lock); |
333 | s->s_fs_info = info; | 324 | s->s_fs_info = info; |
334 | 325 | ||
@@ -443,7 +434,6 @@ static int bfs_fill_super(struct super_block *s, void *data, int silent) | |||
443 | brelse(bh); | 434 | brelse(bh); |
444 | brelse(sbh); | 435 | brelse(sbh); |
445 | dump_imap("read_super", s); | 436 | dump_imap("read_super", s); |
446 | unlock_kernel(); | ||
447 | return 0; | 437 | return 0; |
448 | 438 | ||
449 | out3: | 439 | out3: |
@@ -457,7 +447,6 @@ out: | |||
457 | mutex_destroy(&info->bfs_lock); | 447 | mutex_destroy(&info->bfs_lock); |
458 | kfree(info); | 448 | kfree(info); |
459 | s->s_fs_info = NULL; | 449 | s->s_fs_info = NULL; |
460 | unlock_kernel(); | ||
461 | return ret; | 450 | return ret; |
462 | } | 451 | } |
463 | 452 | ||