summaryrefslogtreecommitdiffstats
path: root/fs/bfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bfs/inode.c')
-rw-r--r--fs/bfs/inode.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c
index c4daf0f5fc02..d2e09363dd93 100644
--- a/fs/bfs/inode.c
+++ b/fs/bfs/inode.c
@@ -322,9 +322,13 @@ 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)
+ if (!info) {
+ unlock_kernel();
return -ENOMEM;
+ }
mutex_init(&info->bfs_lock);
s->s_fs_info = info;
@@ -439,6 +443,7 @@ 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:
@@ -452,6 +457,7 @@ out:
mutex_destroy(&info->bfs_lock);
kfree(info);
s->s_fs_info = NULL;
+ unlock_kernel();
return ret;
}