[PATCH 09/27] BKL: Remove BKL from 9p

From: Jan Blunck
Date: Mon Nov 02 2009 - 05:13:46 EST


BKL is only used in get_sb. It is safe to remove it.

The only shared data structure that is accessed during get_sb is the session
list which is protected by a spinlock.

Signed-off-by: Jan Blunck <jblunck@xxxxxxx>
---
fs/9p/vfs_super.c | 9 +--------
1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c
index 4156a0c..14a8644 100644
--- a/fs/9p/vfs_super.c
+++ b/fs/9p/vfs_super.c
@@ -106,15 +106,11 @@ static int v9fs_get_sb(struct file_system_type *fs_type, int flags,
struct p9_fid *fid;
int retval = 0;

- lock_kernel();
-
P9_DPRINTK(P9_DEBUG_VFS, " \n");

v9ses = kzalloc(sizeof(struct v9fs_session_info), GFP_KERNEL);
- if (!v9ses) {
- unlock_kernel();
+ if (!v9ses)
return -ENOMEM;
- }

fid = v9fs_session_init(v9ses, dev_name, data);
if (IS_ERR(fid)) {
@@ -159,7 +155,6 @@ static int v9fs_get_sb(struct file_system_type *fs_type, int flags,

P9_DPRINTK(P9_DEBUG_VFS, " simple set mount, return 0\n");
simple_set_mnt(mnt, sb);
- unlock_kernel();
return 0;

free_stat:
@@ -172,14 +167,12 @@ clunk_fid:
close_session:
v9fs_session_close(v9ses);
kfree(v9ses);
- unlock_kernel();
return retval;

release_sb:
p9stat_free(st);
kfree(st);
deactivate_locked_super(sb);
- unlock_kernel();
return retval;
}

--
1.6.4.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/