[PATCH 25/27] BKL: Remove BKL from sysfs

From: Jan Blunck
Date: Mon Nov 02 2009 - 05:11:37 EST


BKL is only used in fill_super and get_sb_single() is used. It is safe to
remove it.

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

diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c
index 2e5a870..9487575 100644
--- a/fs/sysfs/mount.c
+++ b/fs/sysfs/mount.c
@@ -10,7 +10,7 @@
* Please see Documentation/filesystems/sysfs.txt for more information.
*/

-#define DEBUG
+#define DEBUG

#include <linux/fs.h>
#include <linux/mount.h>
@@ -18,7 +18,6 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/magic.h>
-#include <linux/smp_lock.h> /* Only for lock_kernel() */

#include "sysfs.h"

@@ -46,8 +45,6 @@ static int sysfs_fill_super(struct super_block *sb, void *data, int silent)
struct inode *inode;
struct dentry *root;

- lock_kernel();
-
sb->s_blocksize = PAGE_CACHE_SIZE;
sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
sb->s_magic = SYSFS_MAGIC;
@@ -61,7 +58,6 @@ static int sysfs_fill_super(struct super_block *sb, void *data, int silent)
mutex_unlock(&sysfs_mutex);
if (!inode) {
pr_debug("sysfs: could not get root inode\n");
- unlock_kernel();
return -ENOMEM;
}

@@ -70,12 +66,10 @@ static int sysfs_fill_super(struct super_block *sb, void *data, int silent)
if (!root) {
pr_debug("%s: could not get root dentry!\n",__func__);
iput(inode);
- unlock_kernel();
return -ENOMEM;
}
root->d_fsdata = &sysfs_root;
sb->s_root = root;
- unlock_kernel();
return 0;
}

--
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/