From ba13d597a60a1a26614f18b76c1a2cad1a548e46 Mon Sep 17 00:00:00 2001 From: Jan Blunck Date: Wed, 24 Feb 2010 13:25:29 +0100 Subject: 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 Signed-off-by: Arnd Bergmann diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c index d2e0936..883e77a 100644 --- a/fs/bfs/inode.c +++ b/fs/bfs/inode.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -215,14 +214,10 @@ static void bfs_put_super(struct super_block *s) if (!info) return; - lock_kernel(); - mutex_destroy(&info->bfs_lock); kfree(info->si_imap); kfree(info); s->s_fs_info = NULL; - - unlock_kernel(); } 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; unsigned long i_sblock, i_eblock, i_eoff, s_size; - lock_kernel(); - info = kzalloc(sizeof(*info), GFP_KERNEL); - if (!info) { - unlock_kernel(); + if (!info) return -ENOMEM; - } mutex_init(&info->bfs_lock); 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(sbh); dump_imap("read_super", s); - unlock_kernel(); return 0; out3: @@ -457,7 +447,6 @@ out: mutex_destroy(&info->bfs_lock); kfree(info); s->s_fs_info = NULL; - unlock_kernel(); return ret; } -- cgit v0.10.2