summaryrefslogtreecommitdiffstats
path: root/fs/adfs/super.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2011-01-22 20:05:05 +0100
committerArnd Bergmann <arnd@arndb.de>2011-03-02 00:02:38 +0100
commit4688a066ecf60086ea82f68edb3b036b567d2c08 (patch)
treee1a4b93e5b5084adfbf78c83de32dc590959fe14 /fs/adfs/super.c
parentf5412be599602124d2bdd49947b231dd77c0bf99 (diff)
downloadop-kernel-dev-4688a066ecf60086ea82f68edb3b036b567d2c08.zip
op-kernel-dev-4688a066ecf60086ea82f68edb3b036b567d2c08.tar.gz
adfs: remove the big kernel lock
According to Russell King, adfs was written to not require the big kernel lock, and all inode updates are done under adfs_dir_lock. All other metadata in adfs is read-only and does not require locking. The use of the BKL is the result of various pushdowns from the VFS operations. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Russell King <rmk@arm.linux.org.uk> Cc: Stuart Swales <stuart.swales.croftnuisk@gmail.com>
Diffstat (limited to 'fs/adfs/super.c')
-rw-r--r--fs/adfs/super.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/fs/adfs/super.c b/fs/adfs/super.c
index 2d79540..06d7388 100644
--- a/fs/adfs/super.c
+++ b/fs/adfs/super.c
@@ -14,7 +14,6 @@
#include <linux/mount.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
-#include <linux/smp_lock.h>
#include <linux/statfs.h>
#include "adfs.h"
#include "dir_f.h"
@@ -120,15 +119,11 @@ static void adfs_put_super(struct super_block *sb)
int i;
struct adfs_sb_info *asb = ADFS_SB(sb);
- lock_kernel();
-
for (i = 0; i < asb->s_map_size; i++)
brelse(asb->s_map[i].dm_bh);
kfree(asb->s_map);
kfree(asb);
sb->s_fs_info = NULL;
-
- unlock_kernel();
}
static int adfs_show_options(struct seq_file *seq, struct vfsmount *mnt)
@@ -359,15 +354,11 @@ static int adfs_fill_super(struct super_block *sb, void *data, int silent)
struct adfs_sb_info *asb;
struct inode *root;
- lock_kernel();
-
sb->s_flags |= MS_NODIRATIME;
asb = kzalloc(sizeof(*asb), GFP_KERNEL);
- if (!asb) {
- unlock_kernel();
+ if (!asb)
return -ENOMEM;
- }
sb->s_fs_info = asb;
/* set default options */
@@ -485,7 +476,6 @@ static int adfs_fill_super(struct super_block *sb, void *data, int silent)
adfs_error(sb, "get root inode failed\n");
goto error;
}
- unlock_kernel();
return 0;
error_free_bh:
@@ -493,7 +483,6 @@ error_free_bh:
error:
sb->s_fs_info = NULL;
kfree(asb);
- unlock_kernel();
return -EINVAL;
}
OpenPOWER on IntegriCloud