aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nilfs2/super.c')
-rw-r--r--fs/nilfs2/super.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
index 7262e8427c2..11151eaa2c4 100644
--- a/fs/nilfs2/super.c
+++ b/fs/nilfs2/super.c
@@ -906,6 +906,8 @@ static int nilfs_remount(struct super_block *sb, int *flags, char *data)
906 struct nilfs_mount_options old_opts; 906 struct nilfs_mount_options old_opts;
907 int err; 907 int err;
908 908
909 lock_kernel();
910
909 old_sb_flags = sb->s_flags; 911 old_sb_flags = sb->s_flags;
910 old_opts.mount_opt = sbi->s_mount_opt; 912 old_opts.mount_opt = sbi->s_mount_opt;
911 old_opts.snapshot_cno = sbi->s_snapshot_cno; 913 old_opts.snapshot_cno = sbi->s_snapshot_cno;
@@ -985,6 +987,7 @@ static int nilfs_remount(struct super_block *sb, int *flags, char *data)
985 up(&sb->s_bdev->bd_mount_sem); 987 up(&sb->s_bdev->bd_mount_sem);
986 } 988 }
987 out: 989 out:
990 unlock_kernel();
988 return 0; 991 return 0;
989 992
990 rw_remount_failed: 993 rw_remount_failed:
@@ -993,6 +996,7 @@ static int nilfs_remount(struct super_block *sb, int *flags, char *data)
993 sb->s_flags = old_sb_flags; 996 sb->s_flags = old_sb_flags;
994 sbi->s_mount_opt = old_opts.mount_opt; 997 sbi->s_mount_opt = old_opts.mount_opt;
995 sbi->s_snapshot_cno = old_opts.snapshot_cno; 998 sbi->s_snapshot_cno = old_opts.snapshot_cno;
999 unlock_kernel();
996 return err; 1000 return err;
997} 1001}
998 1002