Push BKL down into ->remount_fs()
[xfs, btrfs, capifs, shmem don't need BKL, exempt]
Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
index 7262e84..11151ea 100644
--- a/fs/nilfs2/super.c
+++ b/fs/nilfs2/super.c
@@ -906,6 +906,8 @@
struct nilfs_mount_options old_opts;
int err;
+ lock_kernel();
+
old_sb_flags = sb->s_flags;
old_opts.mount_opt = sbi->s_mount_opt;
old_opts.snapshot_cno = sbi->s_snapshot_cno;
@@ -985,6 +987,7 @@
up(&sb->s_bdev->bd_mount_sem);
}
out:
+ unlock_kernel();
return 0;
rw_remount_failed:
@@ -993,6 +996,7 @@
sb->s_flags = old_sb_flags;
sbi->s_mount_opt = old_opts.mount_opt;
sbi->s_snapshot_cno = old_opts.snapshot_cno;
+ unlock_kernel();
return err;
}