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@xxxxxxx> --- fs/bfs/inode.c | 17 +++-------------- 1 files changed, 3 insertions(+), 14 deletions(-) diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c index 4bff506..8ed127a 100644 --- a/fs/bfs/inode.c +++ b/fs/bfs/inode.c @@ -12,7 +12,6 @@ #include <linux/slab.h> #include <linux/init.h> #include <linux/fs.h> -#include <linux/smp_lock.h> #include <linux/buffer_head.h> #include <linux/vfs.h> #include <asm/uaccess.h> @@ -243,8 +242,6 @@ static void bfs_put_super(struct super_block *s) if (!info) return; - lock_kernel(); - if (s->s_dirt) bfs_write_super(s); @@ -253,8 +250,6 @@ static void bfs_put_super(struct super_block *s) kfree(info->si_imap); kfree(info); s->s_fs_info = NULL; - - unlock_kernel(); } static int bfs_statfs(struct dentry *dentry, struct kstatfs *buf) @@ -356,13 +351,10 @@ static int bfs_fill_super(struct super_block *s, void *data, int silent) long 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; - } + s->s_fs_info = info; sb_set_blocksize(s, BFS_BSIZE); @@ -467,7 +459,6 @@ static int bfs_fill_super(struct super_block *s, void *data, int silent) kfree(info->si_imap); kfree(info); s->s_fs_info = NULL; - unlock_kernel(); return -EIO; } @@ -486,17 +477,15 @@ static int bfs_fill_super(struct super_block *s, void *data, int silent) if (!(s->s_flags & MS_RDONLY)) { mark_buffer_dirty(info->si_sbh); s->s_dirt = 1; - } + } dump_imap("read_super", s); mutex_init(&info->bfs_lock); - unlock_kernel(); return 0; out: brelse(bh); kfree(info); s->s_fs_info = NULL; - unlock_kernel(); return ret; } -- 1.6.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html