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.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
index 0d573c2a686..9f4913f7840 100644
--- a/fs/nilfs2/super.c
+++ b/fs/nilfs2/super.c
@@ -45,7 +45,6 @@
45#include <linux/parser.h> 45#include <linux/parser.h>
46#include <linux/random.h> 46#include <linux/random.h>
47#include <linux/crc32.h> 47#include <linux/crc32.h>
48#include <linux/smp_lock.h>
49#include <linux/vfs.h> 48#include <linux/vfs.h>
50#include <linux/writeback.h> 49#include <linux/writeback.h>
51#include <linux/kobject.h> 50#include <linux/kobject.h>
@@ -342,8 +341,6 @@ static void nilfs_put_super(struct super_block *sb)
342 struct nilfs_sb_info *sbi = NILFS_SB(sb); 341 struct nilfs_sb_info *sbi = NILFS_SB(sb);
343 struct the_nilfs *nilfs = sbi->s_nilfs; 342 struct the_nilfs *nilfs = sbi->s_nilfs;
344 343
345 lock_kernel();
346
347 nilfs_detach_segment_constructor(sbi); 344 nilfs_detach_segment_constructor(sbi);
348 345
349 if (!(sb->s_flags & MS_RDONLY)) { 346 if (!(sb->s_flags & MS_RDONLY)) {
@@ -361,8 +358,6 @@ static void nilfs_put_super(struct super_block *sb)
361 sbi->s_super = NULL; 358 sbi->s_super = NULL;
362 sb->s_fs_info = NULL; 359 sb->s_fs_info = NULL;
363 nilfs_put_sbinfo(sbi); 360 nilfs_put_sbinfo(sbi);
364
365 unlock_kernel();
366} 361}
367 362
368static int nilfs_sync_fs(struct super_block *sb, int wait) 363static int nilfs_sync_fs(struct super_block *sb, int wait)
@@ -949,8 +944,6 @@ static int nilfs_remount(struct super_block *sb, int *flags, char *data)
949 struct nilfs_mount_options old_opts; 944 struct nilfs_mount_options old_opts;
950 int was_snapshot, err; 945 int was_snapshot, err;
951 946
952 lock_kernel();
953
954 down_write(&nilfs->ns_super_sem); 947 down_write(&nilfs->ns_super_sem);
955 old_sb_flags = sb->s_flags; 948 old_sb_flags = sb->s_flags;
956 old_opts.mount_opt = sbi->s_mount_opt; 949 old_opts.mount_opt = sbi->s_mount_opt;
@@ -1024,7 +1017,6 @@ static int nilfs_remount(struct super_block *sb, int *flags, char *data)
1024 } 1017 }
1025 out: 1018 out:
1026 up_write(&nilfs->ns_super_sem); 1019 up_write(&nilfs->ns_super_sem);
1027 unlock_kernel();
1028 return 0; 1020 return 0;
1029 1021
1030 restore_opts: 1022 restore_opts:
@@ -1032,7 +1024,6 @@ static int nilfs_remount(struct super_block *sb, int *flags, char *data)
1032 sbi->s_mount_opt = old_opts.mount_opt; 1024 sbi->s_mount_opt = old_opts.mount_opt;
1033 sbi->s_snapshot_cno = old_opts.snapshot_cno; 1025 sbi->s_snapshot_cno = old_opts.snapshot_cno;
1034 up_write(&nilfs->ns_super_sem); 1026 up_write(&nilfs->ns_super_sem);
1035 unlock_kernel();
1036 return err; 1027 return err;
1037} 1028}
1038 1029
@@ -1113,12 +1104,9 @@ nilfs_get_sb(struct file_system_type *fs_type, int flags,
1113 if (!(flags & MS_RDONLY)) 1104 if (!(flags & MS_RDONLY))
1114 mode |= FMODE_WRITE; 1105 mode |= FMODE_WRITE;
1115 1106
1116 lock_kernel();
1117 sd.bdev = open_bdev_exclusive(dev_name, mode, fs_type); 1107 sd.bdev = open_bdev_exclusive(dev_name, mode, fs_type);
1118 if (IS_ERR(sd.bdev)) { 1108 if (IS_ERR(sd.bdev))
1119 unlock_kernel();
1120 return PTR_ERR(sd.bdev); 1109 return PTR_ERR(sd.bdev);
1121 }
1122 1110
1123 /* 1111 /*
1124 * To get mount instance using sget() vfs-routine, NILFS needs 1112 * To get mount instance using sget() vfs-routine, NILFS needs
@@ -1201,7 +1189,6 @@ nilfs_get_sb(struct file_system_type *fs_type, int flags,
1201 if (need_to_close) 1189 if (need_to_close)
1202 close_bdev_exclusive(sd.bdev, mode); 1190 close_bdev_exclusive(sd.bdev, mode);
1203 simple_set_mnt(mnt, s); 1191 simple_set_mnt(mnt, s);
1204 unlock_kernel();
1205 return 0; 1192 return 0;
1206 1193
1207 failed_unlock: 1194 failed_unlock:
@@ -1209,8 +1196,6 @@ nilfs_get_sb(struct file_system_type *fs_type, int flags,
1209 put_nilfs(nilfs); 1196 put_nilfs(nilfs);
1210 failed: 1197 failed:
1211 close_bdev_exclusive(sd.bdev, mode); 1198 close_bdev_exclusive(sd.bdev, mode);
1212
1213 unlock_kernel();
1214 return err; 1199 return err;
1215 1200
1216 cancel_new: 1201 cancel_new:
@@ -1223,7 +1208,6 @@ nilfs_get_sb(struct file_system_type *fs_type, int flags,
1223 * We must finish all post-cleaning before this call; 1208 * We must finish all post-cleaning before this call;
1224 * put_nilfs() needs the block device. 1209 * put_nilfs() needs the block device.
1225 */ 1210 */
1226 unlock_kernel();
1227 return err; 1211 return err;
1228} 1212}
1229 1213