diff options
Diffstat (limited to 'fs/jfs/super.c')
-rw-r--r-- | fs/jfs/super.c | 35 |
1 files changed, 7 insertions, 28 deletions
diff --git a/fs/jfs/super.c b/fs/jfs/super.c index eb31f677347d..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 | ||
@@ -438,20 +424,15 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent) | |||
438 | s64 newLVSize = 0; | 424 | s64 newLVSize = 0; |
439 | int flag, ret = -EINVAL; | 425 | int flag, ret = -EINVAL; |
440 | 426 | ||
441 | lock_kernel(); | ||
442 | |||
443 | jfs_info("In jfs_read_super: s_flags=0x%lx", sb->s_flags); | 427 | jfs_info("In jfs_read_super: s_flags=0x%lx", sb->s_flags); |
444 | 428 | ||
445 | if (!new_valid_dev(sb->s_bdev->bd_dev)) { | 429 | if (!new_valid_dev(sb->s_bdev->bd_dev)) |
446 | unlock_kernel(); | ||
447 | return -EOVERFLOW; | 430 | return -EOVERFLOW; |
448 | } | ||
449 | 431 | ||
450 | sbi = kzalloc(sizeof (struct jfs_sb_info), GFP_KERNEL); | 432 | sbi = kzalloc(sizeof (struct jfs_sb_info), GFP_KERNEL); |
451 | if (!sbi) { | 433 | if (!sbi) |
452 | unlock_kernel(); | ||
453 | return -ENOMEM; | 434 | return -ENOMEM; |
454 | } | 435 | |
455 | sb->s_fs_info = sbi; | 436 | sb->s_fs_info = sbi; |
456 | sbi->sb = sb; | 437 | sbi->sb = sb; |
457 | sbi->uid = sbi->gid = sbi->umask = -1; | 438 | sbi->uid = sbi->gid = sbi->umask = -1; |
@@ -548,7 +529,6 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent) | |||
548 | sb->s_maxbytes = min(((u64) PAGE_CACHE_SIZE << 32) - 1, (u64)sb->s_maxbytes); | 529 | sb->s_maxbytes = min(((u64) PAGE_CACHE_SIZE << 32) - 1, (u64)sb->s_maxbytes); |
549 | #endif | 530 | #endif |
550 | sb->s_time_gran = 1; | 531 | sb->s_time_gran = 1; |
551 | unlock_kernel(); | ||
552 | return 0; | 532 | return 0; |
553 | 533 | ||
554 | out_no_root: | 534 | out_no_root: |
@@ -571,7 +551,6 @@ out_unload: | |||
571 | unload_nls(sbi->nls_tab); | 551 | unload_nls(sbi->nls_tab); |
572 | out_kfree: | 552 | out_kfree: |
573 | kfree(sbi); | 553 | kfree(sbi); |
574 | unlock_kernel(); | ||
575 | return ret; | 554 | return ret; |
576 | } | 555 | } |
577 | 556 | ||