aboutsummaryrefslogtreecommitdiffstats
path: root/fs/affs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-22 13:52:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-22 13:52:01 -0400
commit79f14b7c56d3b3ba58f8b43d1f70b9b71477a800 (patch)
tree3bb53b7806c1baba6cc24b91724a9264cceccd39 /fs/affs
parentc37927d4359e81b85de644f8fb08878717cf5f3f (diff)
parent6d7bccc2215c37205ede6c9cf84db64e7c4f9443 (diff)
Merge branch 'vfs' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl
* 'vfs' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl: (30 commits) BKL: remove BKL from freevxfs BKL: remove BKL from qnx4 autofs4: Only declare function when CONFIG_COMPAT is defined autofs: Only declare function when CONFIG_COMPAT is defined ncpfs: Lock socket in ncpfs while setting its callbacks fs/locks.c: prepare for BKL removal BKL: Remove BKL from ncpfs BKL: Remove BKL from OCFS2 BKL: Remove BKL from squashfs BKL: Remove BKL from jffs2 BKL: Remove BKL from ecryptfs BKL: Remove BKL from afs BKL: Remove BKL from USB gadgetfs BKL: Remove BKL from autofs4 BKL: Remove BKL from isofs BKL: Remove BKL from fat BKL: Remove BKL from ext2 filesystem BKL: Remove BKL from do_new_mount() BKL: Remove BKL from cgroup BKL: Remove BKL from NTFS ...
Diffstat (limited to 'fs/affs')
-rw-r--r--fs/affs/super.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/fs/affs/super.c b/fs/affs/super.c
index 9581ea94d5a1..fa4fbe1e238a 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -16,7 +16,6 @@
16#include <linux/parser.h> 16#include <linux/parser.h>
17#include <linux/magic.h> 17#include <linux/magic.h>
18#include <linux/sched.h> 18#include <linux/sched.h>
19#include <linux/smp_lock.h>
20#include <linux/slab.h> 19#include <linux/slab.h>
21#include "affs.h" 20#include "affs.h"
22 21
@@ -46,8 +45,6 @@ affs_put_super(struct super_block *sb)
46 struct affs_sb_info *sbi = AFFS_SB(sb); 45 struct affs_sb_info *sbi = AFFS_SB(sb);
47 pr_debug("AFFS: put_super()\n"); 46 pr_debug("AFFS: put_super()\n");
48 47
49 lock_kernel();
50
51 if (!(sb->s_flags & MS_RDONLY) && sb->s_dirt) 48 if (!(sb->s_flags & MS_RDONLY) && sb->s_dirt)
52 affs_commit_super(sb, 1, 1); 49 affs_commit_super(sb, 1, 1);
53 50
@@ -56,8 +53,6 @@ affs_put_super(struct super_block *sb)
56 affs_brelse(sbi->s_root_bh); 53 affs_brelse(sbi->s_root_bh);
57 kfree(sbi); 54 kfree(sbi);
58 sb->s_fs_info = NULL; 55 sb->s_fs_info = NULL;
59
60 unlock_kernel();
61} 56}
62 57
63static void 58static void
@@ -302,6 +297,7 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
302 sbi = kzalloc(sizeof(struct affs_sb_info), GFP_KERNEL); 297 sbi = kzalloc(sizeof(struct affs_sb_info), GFP_KERNEL);
303 if (!sbi) 298 if (!sbi)
304 return -ENOMEM; 299 return -ENOMEM;
300
305 sb->s_fs_info = sbi; 301 sb->s_fs_info = sbi;
306 mutex_init(&sbi->s_bmlock); 302 mutex_init(&sbi->s_bmlock);
307 spin_lock_init(&sbi->symlink_lock); 303 spin_lock_init(&sbi->symlink_lock);
@@ -527,7 +523,7 @@ affs_remount(struct super_block *sb, int *flags, char *data)
527 kfree(new_opts); 523 kfree(new_opts);
528 return -EINVAL; 524 return -EINVAL;
529 } 525 }
530 lock_kernel(); 526
531 replace_mount_options(sb, new_opts); 527 replace_mount_options(sb, new_opts);
532 528
533 sbi->s_flags = mount_flags; 529 sbi->s_flags = mount_flags;
@@ -543,17 +539,15 @@ affs_remount(struct super_block *sb, int *flags, char *data)
543 memcpy(sbi->s_volume, volume, 32); 539 memcpy(sbi->s_volume, volume, 32);
544 spin_unlock(&sbi->symlink_lock); 540 spin_unlock(&sbi->symlink_lock);
545 541
546 if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) { 542 if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY))
547 unlock_kernel();
548 return 0; 543 return 0;
549 } 544
550 if (*flags & MS_RDONLY) { 545 if (*flags & MS_RDONLY) {
551 affs_write_super(sb); 546 affs_write_super(sb);
552 affs_free_bitmap(sb); 547 affs_free_bitmap(sb);
553 } else 548 } else
554 res = affs_init_bitmap(sb, flags); 549 res = affs_init_bitmap(sb, flags);
555 550
556 unlock_kernel();
557 return res; 551 return res;
558} 552}
559 553