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>
This commit is contained in:
Jan Blunck 2010-02-24 13:25:29 +01:00 committed by Arnd Bergmann
parent 74c41429ae
commit ba13d597a6

View File

@ -12,7 +12,6 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/smp_lock.h>
#include <linux/buffer_head.h> #include <linux/buffer_head.h>
#include <linux/vfs.h> #include <linux/vfs.h>
#include <linux/writeback.h> #include <linux/writeback.h>
@ -215,14 +214,10 @@ static void bfs_put_super(struct super_block *s)
if (!info) if (!info)
return; return;
lock_kernel();
mutex_destroy(&info->bfs_lock); mutex_destroy(&info->bfs_lock);
kfree(info->si_imap); kfree(info->si_imap);
kfree(info); kfree(info);
s->s_fs_info = NULL; s->s_fs_info = NULL;
unlock_kernel();
} }
static int bfs_statfs(struct dentry *dentry, struct kstatfs *buf) 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)
int ret = -EINVAL; int ret = -EINVAL;
unsigned long i_sblock, i_eblock, i_eoff, s_size; unsigned long i_sblock, i_eblock, i_eoff, s_size;
lock_kernel();
info = kzalloc(sizeof(*info), GFP_KERNEL); info = kzalloc(sizeof(*info), GFP_KERNEL);
if (!info) { if (!info)
unlock_kernel();
return -ENOMEM; return -ENOMEM;
}
mutex_init(&info->bfs_lock); mutex_init(&info->bfs_lock);
s->s_fs_info = info; s->s_fs_info = info;
@ -443,7 +434,6 @@ static int bfs_fill_super(struct super_block *s, void *data, int silent)
brelse(bh); brelse(bh);
brelse(sbh); brelse(sbh);
dump_imap("read_super", s); dump_imap("read_super", s);
unlock_kernel();
return 0; return 0;
out3: out3:
@ -457,7 +447,6 @@ out:
mutex_destroy(&info->bfs_lock); mutex_destroy(&info->bfs_lock);
kfree(info); kfree(info);
s->s_fs_info = NULL; s->s_fs_info = NULL;
unlock_kernel();
return ret; return ret;
} }