aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ufs
diff options
context:
space:
mode:
authorAlessio Igor Bogani <abogani@texware.it>2009-05-12 09:10:54 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-11 21:36:11 -0400
commit337eb00a2c3a421999c39c94ce7e33545ee8baa7 (patch)
treed9b780d095b638b1d8fa23841ff70347cf5daa08 /fs/ufs
parent4195f73d1329e49727bcceb028e58cb38376c2b0 (diff)
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>
Diffstat (limited to 'fs/ufs')
-rw-r--r--fs/ufs/super.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index c97210ee0670..6560dda7b18c 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -263,6 +263,7 @@ void ufs_panic (struct super_block * sb, const char * function,
263 struct ufs_super_block_first * usb1; 263 struct ufs_super_block_first * usb1;
264 va_list args; 264 va_list args;
265 265
266 lock_kernel();
266 uspi = UFS_SB(sb)->s_uspi; 267 uspi = UFS_SB(sb)->s_uspi;
267 usb1 = ubh_get_usb_first(uspi); 268 usb1 = ubh_get_usb_first(uspi);
268 269
@@ -1182,7 +1183,8 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data)
1182 struct ufs_super_block_third * usb3; 1183 struct ufs_super_block_third * usb3;
1183 unsigned new_mount_opt, ufstype; 1184 unsigned new_mount_opt, ufstype;
1184 unsigned flags; 1185 unsigned flags;
1185 1186
1187 lock_kernel();
1186 lock_super(sb); 1188 lock_super(sb);
1187 uspi = UFS_SB(sb)->s_uspi; 1189 uspi = UFS_SB(sb)->s_uspi;
1188 flags = UFS_SB(sb)->s_flags; 1190 flags = UFS_SB(sb)->s_flags;
@@ -1198,6 +1200,7 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data)
1198 ufs_set_opt (new_mount_opt, ONERROR_LOCK); 1200 ufs_set_opt (new_mount_opt, ONERROR_LOCK);
1199 if (!ufs_parse_options (data, &new_mount_opt)) { 1201 if (!ufs_parse_options (data, &new_mount_opt)) {
1200 unlock_super(sb); 1202 unlock_super(sb);
1203 unlock_kernel();
1201 return -EINVAL; 1204 return -EINVAL;
1202 } 1205 }
1203 if (!(new_mount_opt & UFS_MOUNT_UFSTYPE)) { 1206 if (!(new_mount_opt & UFS_MOUNT_UFSTYPE)) {
@@ -1205,12 +1208,14 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data)
1205 } else if ((new_mount_opt & UFS_MOUNT_UFSTYPE) != ufstype) { 1208 } else if ((new_mount_opt & UFS_MOUNT_UFSTYPE) != ufstype) {
1206 printk("ufstype can't be changed during remount\n"); 1209 printk("ufstype can't be changed during remount\n");
1207 unlock_super(sb); 1210 unlock_super(sb);
1211 unlock_kernel();
1208 return -EINVAL; 1212 return -EINVAL;
1209 } 1213 }
1210 1214
1211 if ((*mount_flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) { 1215 if ((*mount_flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) {
1212 UFS_SB(sb)->s_mount_opt = new_mount_opt; 1216 UFS_SB(sb)->s_mount_opt = new_mount_opt;
1213 unlock_super(sb); 1217 unlock_super(sb);
1218 unlock_kernel();
1214 return 0; 1219 return 0;
1215 } 1220 }
1216 1221
@@ -1236,6 +1241,7 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data)
1236 printk("ufs was compiled with read-only support, " 1241 printk("ufs was compiled with read-only support, "
1237 "can't be mounted as read-write\n"); 1242 "can't be mounted as read-write\n");
1238 unlock_super(sb); 1243 unlock_super(sb);
1244 unlock_kernel();
1239 return -EINVAL; 1245 return -EINVAL;
1240#else 1246#else
1241 if (ufstype != UFS_MOUNT_UFSTYPE_SUN && 1247 if (ufstype != UFS_MOUNT_UFSTYPE_SUN &&
@@ -1245,11 +1251,13 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data)
1245 ufstype != UFS_MOUNT_UFSTYPE_UFS2) { 1251 ufstype != UFS_MOUNT_UFSTYPE_UFS2) {
1246 printk("this ufstype is read-only supported\n"); 1252 printk("this ufstype is read-only supported\n");
1247 unlock_super(sb); 1253 unlock_super(sb);
1254 unlock_kernel();
1248 return -EINVAL; 1255 return -EINVAL;
1249 } 1256 }
1250 if (!ufs_read_cylinder_structures(sb)) { 1257 if (!ufs_read_cylinder_structures(sb)) {
1251 printk("failed during remounting\n"); 1258 printk("failed during remounting\n");
1252 unlock_super(sb); 1259 unlock_super(sb);
1260 unlock_kernel();
1253 return -EPERM; 1261 return -EPERM;
1254 } 1262 }
1255 sb->s_flags &= ~MS_RDONLY; 1263 sb->s_flags &= ~MS_RDONLY;
@@ -1257,6 +1265,7 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data)
1257 } 1265 }
1258 UFS_SB(sb)->s_mount_opt = new_mount_opt; 1266 UFS_SB(sb)->s_mount_opt = new_mount_opt;
1259 unlock_super(sb); 1267 unlock_super(sb);
1268 unlock_kernel();
1260 return 0; 1269 return 0;
1261} 1270}
1262 1271