diff options
author | Arnd Bergmann <arnd@arndb.de> | 2011-01-22 14:05:05 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2011-03-01 18:02:38 -0500 |
commit | 4688a066ecf60086ea82f68edb3b036b567d2c08 (patch) | |
tree | e1a4b93e5b5084adfbf78c83de32dc590959fe14 /fs/adfs/super.c | |
parent | f5412be599602124d2bdd49947b231dd77c0bf99 (diff) |
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.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/fs/adfs/super.c b/fs/adfs/super.c index 2d7954049fbe..06d7388b477b 100644 --- a/fs/adfs/super.c +++ b/fs/adfs/super.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/mount.h> | 14 | #include <linux/mount.h> |
15 | #include <linux/seq_file.h> | 15 | #include <linux/seq_file.h> |
16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
17 | #include <linux/smp_lock.h> | ||
18 | #include <linux/statfs.h> | 17 | #include <linux/statfs.h> |
19 | #include "adfs.h" | 18 | #include "adfs.h" |
20 | #include "dir_f.h" | 19 | #include "dir_f.h" |
@@ -120,15 +119,11 @@ static void adfs_put_super(struct super_block *sb) | |||
120 | int i; | 119 | int i; |
121 | struct adfs_sb_info *asb = ADFS_SB(sb); | 120 | struct adfs_sb_info *asb = ADFS_SB(sb); |
122 | 121 | ||
123 | lock_kernel(); | ||
124 | |||
125 | for (i = 0; i < asb->s_map_size; i++) | 122 | for (i = 0; i < asb->s_map_size; i++) |
126 | brelse(asb->s_map[i].dm_bh); | 123 | brelse(asb->s_map[i].dm_bh); |
127 | kfree(asb->s_map); | 124 | kfree(asb->s_map); |
128 | kfree(asb); | 125 | kfree(asb); |
129 | sb->s_fs_info = NULL; | 126 | sb->s_fs_info = NULL; |
130 | |||
131 | unlock_kernel(); | ||
132 | } | 127 | } |
133 | 128 | ||
134 | static int adfs_show_options(struct seq_file *seq, struct vfsmount *mnt) | 129 | 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) | |||
359 | struct adfs_sb_info *asb; | 354 | struct adfs_sb_info *asb; |
360 | struct inode *root; | 355 | struct inode *root; |
361 | 356 | ||
362 | lock_kernel(); | ||
363 | |||
364 | sb->s_flags |= MS_NODIRATIME; | 357 | sb->s_flags |= MS_NODIRATIME; |
365 | 358 | ||
366 | asb = kzalloc(sizeof(*asb), GFP_KERNEL); | 359 | asb = kzalloc(sizeof(*asb), GFP_KERNEL); |
367 | if (!asb) { | 360 | if (!asb) |
368 | unlock_kernel(); | ||
369 | return -ENOMEM; | 361 | return -ENOMEM; |
370 | } | ||
371 | sb->s_fs_info = asb; | 362 | sb->s_fs_info = asb; |
372 | 363 | ||
373 | /* set default options */ | 364 | /* set default options */ |
@@ -485,7 +476,6 @@ static int adfs_fill_super(struct super_block *sb, void *data, int silent) | |||
485 | adfs_error(sb, "get root inode failed\n"); | 476 | adfs_error(sb, "get root inode failed\n"); |
486 | goto error; | 477 | goto error; |
487 | } | 478 | } |
488 | unlock_kernel(); | ||
489 | return 0; | 479 | return 0; |
490 | 480 | ||
491 | error_free_bh: | 481 | error_free_bh: |
@@ -493,7 +483,6 @@ error_free_bh: | |||
493 | error: | 483 | error: |
494 | sb->s_fs_info = NULL; | 484 | sb->s_fs_info = NULL; |
495 | kfree(asb); | 485 | kfree(asb); |
496 | unlock_kernel(); | ||
497 | return -EINVAL; | 486 | return -EINVAL; |
498 | } | 487 | } |
499 | 488 | ||