diff options
Diffstat (limited to 'fs/jfs')
| -rw-r--r-- | fs/jfs/super.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/fs/jfs/super.c b/fs/jfs/super.c index ec8c3e4baca3..68eee2bf629e 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c | |||
| @@ -33,7 +33,6 @@ | |||
| 33 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
| 34 | #include <asm/uaccess.h> | 34 | #include <asm/uaccess.h> |
| 35 | #include <linux/seq_file.h> | 35 | #include <linux/seq_file.h> |
| 36 | #include <linux/smp_lock.h> | ||
| 37 | 36 | ||
| 38 | #include "jfs_incore.h" | 37 | #include "jfs_incore.h" |
| 39 | #include "jfs_filsys.h" | 38 | #include "jfs_filsys.h" |
| @@ -176,8 +175,6 @@ static void jfs_put_super(struct super_block *sb) | |||
| 176 | 175 | ||
| 177 | dquot_disable(sb, -1, DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED); | 176 | dquot_disable(sb, -1, DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED); |
| 178 | 177 | ||
| 179 | lock_kernel(); | ||
| 180 | |||
| 181 | rc = jfs_umount(sb); | 178 | rc = jfs_umount(sb); |
| 182 | if (rc) | 179 | if (rc) |
| 183 | jfs_err("jfs_umount failed with return code %d", rc); | 180 | jfs_err("jfs_umount failed with return code %d", rc); |
| @@ -188,8 +185,6 @@ static void jfs_put_super(struct super_block *sb) | |||
| 188 | iput(sbi->direct_inode); | 185 | iput(sbi->direct_inode); |
| 189 | 186 | ||
| 190 | kfree(sbi); | 187 | kfree(sbi); |
| 191 | |||
| 192 | unlock_kernel(); | ||
| 193 | } | 188 | } |
| 194 | 189 | ||
| 195 | enum { | 190 | enum { |
| @@ -369,19 +364,16 @@ static int jfs_remount(struct super_block *sb, int *flags, char *data) | |||
| 369 | if (!parse_options(data, sb, &newLVSize, &flag)) { | 364 | if (!parse_options(data, sb, &newLVSize, &flag)) { |
| 370 | return -EINVAL; | 365 | return -EINVAL; |
| 371 | } | 366 | } |
| 372 | lock_kernel(); | 367 | |
| 373 | if (newLVSize) { | 368 | if (newLVSize) { |
| 374 | if (sb->s_flags & MS_RDONLY) { | 369 | if (sb->s_flags & MS_RDONLY) { |
| 375 | printk(KERN_ERR | 370 | printk(KERN_ERR |
| 376 | "JFS: resize requires volume to be mounted read-write\n"); | 371 | "JFS: resize requires volume to be mounted read-write\n"); |
| 377 | unlock_kernel(); | ||
| 378 | return -EROFS; | 372 | return -EROFS; |
| 379 | } | 373 | } |
| 380 | rc = jfs_extendfs(sb, newLVSize, 0); | 374 | rc = jfs_extendfs(sb, newLVSize, 0); |
| 381 | if (rc) { | 375 | if (rc) |
| 382 | unlock_kernel(); | ||
| 383 | return rc; | 376 | return rc; |
| 384 | } | ||
| 385 | } | 377 | } |
| 386 | 378 | ||
| 387 | if ((sb->s_flags & MS_RDONLY) && !(*flags & MS_RDONLY)) { | 379 | if ((sb->s_flags & MS_RDONLY) && !(*flags & MS_RDONLY)) { |
| @@ -397,36 +389,30 @@ static int jfs_remount(struct super_block *sb, int *flags, char *data) | |||
| 397 | /* mark the fs r/w for quota activity */ | 389 | /* mark the fs r/w for quota activity */ |
| 398 | sb->s_flags &= ~MS_RDONLY; | 390 | sb->s_flags &= ~MS_RDONLY; |
| 399 | 391 | ||
| 400 | unlock_kernel(); | ||
| 401 | dquot_resume(sb, -1); | 392 | dquot_resume(sb, -1); |
| 402 | return ret; | 393 | return ret; |
| 403 | } | 394 | } |
| 404 | if ((!(sb->s_flags & MS_RDONLY)) && (*flags & MS_RDONLY)) { | 395 | if ((!(sb->s_flags & MS_RDONLY)) && (*flags & MS_RDONLY)) { |
| 405 | rc = dquot_suspend(sb, -1); | 396 | rc = dquot_suspend(sb, -1); |
| 406 | if (rc < 0) { | 397 | if (rc < 0) { |
| 407 | unlock_kernel(); | ||
| 408 | return rc; | 398 | return rc; |
| 409 | } | 399 | } |
| 410 | rc = jfs_umount_rw(sb); | 400 | rc = jfs_umount_rw(sb); |
| 411 | JFS_SBI(sb)->flag = flag; | 401 | JFS_SBI(sb)->flag = flag; |
| 412 | unlock_kernel(); | ||
| 413 | return rc; | 402 | return rc; |
| 414 | } | 403 | } |
| 415 | if ((JFS_SBI(sb)->flag & JFS_NOINTEGRITY) != (flag & JFS_NOINTEGRITY)) | 404 | if ((JFS_SBI(sb)->flag & JFS_NOINTEGRITY) != (flag & JFS_NOINTEGRITY)) |
| 416 | if (!(sb->s_flags & MS_RDONLY)) { | 405 | if (!(sb->s_flags & MS_RDONLY)) { |
| 417 | rc = jfs_umount_rw(sb); | 406 | rc = jfs_umount_rw(sb); |
| 418 | if (rc) { | 407 | if (rc) |
| 419 | unlock_kernel(); | ||
| 420 | return rc; | 408 | return rc; |
| 421 | } | 409 | |
| 422 | JFS_SBI(sb)->flag = flag; | 410 | JFS_SBI(sb)->flag = flag; |
| 423 | ret = jfs_mount_rw(sb, 1); | 411 | ret = jfs_mount_rw(sb, 1); |
| 424 | unlock_kernel(); | ||
| 425 | return ret; | 412 | return ret; |
| 426 | } | 413 | } |
| 427 | JFS_SBI(sb)->flag = flag; | 414 | JFS_SBI(sb)->flag = flag; |
| 428 | 415 | ||
| 429 | unlock_kernel(); | ||
| 430 | return 0; | 416 | return 0; |
| 431 | } | 417 | } |
| 432 | 418 | ||
| @@ -446,6 +432,7 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent) | |||
| 446 | sbi = kzalloc(sizeof (struct jfs_sb_info), GFP_KERNEL); | 432 | sbi = kzalloc(sizeof (struct jfs_sb_info), GFP_KERNEL); |
| 447 | if (!sbi) | 433 | if (!sbi) |
| 448 | return -ENOMEM; | 434 | return -ENOMEM; |
| 435 | |||
| 449 | sb->s_fs_info = sbi; | 436 | sb->s_fs_info = sbi; |
| 450 | sbi->sb = sb; | 437 | sbi->sb = sb; |
| 451 | sbi->uid = sbi->gid = sbi->umask = -1; | 438 | sbi->uid = sbi->gid = sbi->umask = -1; |
