diff options
author | Alessio Igor Bogani <abogani@texware.it> | 2009-05-12 09:10:54 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-06-11 21:36:11 -0400 |
commit | 337eb00a2c3a421999c39c94ce7e33545ee8baa7 (patch) | |
tree | d9b780d095b638b1d8fa23841ff70347cf5daa08 /fs/ntfs/super.c | |
parent | 4195f73d1329e49727bcceb028e58cb38376c2b0 (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/ntfs/super.c')
-rw-r--r-- | fs/ntfs/super.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c index 7a7b0d326395..abaaa1cbf8de 100644 --- a/fs/ntfs/super.c +++ b/fs/ntfs/super.c | |||
@@ -443,6 +443,8 @@ static int ntfs_remount(struct super_block *sb, int *flags, char *opt) | |||
443 | ntfs_volume *vol = NTFS_SB(sb); | 443 | ntfs_volume *vol = NTFS_SB(sb); |
444 | 444 | ||
445 | ntfs_debug("Entering with remount options string: %s", opt); | 445 | ntfs_debug("Entering with remount options string: %s", opt); |
446 | |||
447 | lock_kernel(); | ||
446 | #ifndef NTFS_RW | 448 | #ifndef NTFS_RW |
447 | /* For read-only compiled driver, enforce read-only flag. */ | 449 | /* For read-only compiled driver, enforce read-only flag. */ |
448 | *flags |= MS_RDONLY; | 450 | *flags |= MS_RDONLY; |
@@ -466,15 +468,18 @@ static int ntfs_remount(struct super_block *sb, int *flags, char *opt) | |||
466 | if (NVolErrors(vol)) { | 468 | if (NVolErrors(vol)) { |
467 | ntfs_error(sb, "Volume has errors and is read-only%s", | 469 | ntfs_error(sb, "Volume has errors and is read-only%s", |
468 | es); | 470 | es); |
471 | unlock_kernel(); | ||
469 | return -EROFS; | 472 | return -EROFS; |
470 | } | 473 | } |
471 | if (vol->vol_flags & VOLUME_IS_DIRTY) { | 474 | if (vol->vol_flags & VOLUME_IS_DIRTY) { |
472 | ntfs_error(sb, "Volume is dirty and read-only%s", es); | 475 | ntfs_error(sb, "Volume is dirty and read-only%s", es); |
476 | unlock_kernel(); | ||
473 | return -EROFS; | 477 | return -EROFS; |
474 | } | 478 | } |
475 | if (vol->vol_flags & VOLUME_MODIFIED_BY_CHKDSK) { | 479 | if (vol->vol_flags & VOLUME_MODIFIED_BY_CHKDSK) { |
476 | ntfs_error(sb, "Volume has been modified by chkdsk " | 480 | ntfs_error(sb, "Volume has been modified by chkdsk " |
477 | "and is read-only%s", es); | 481 | "and is read-only%s", es); |
482 | unlock_kernel(); | ||
478 | return -EROFS; | 483 | return -EROFS; |
479 | } | 484 | } |
480 | if (vol->vol_flags & VOLUME_MUST_MOUNT_RO_MASK) { | 485 | if (vol->vol_flags & VOLUME_MUST_MOUNT_RO_MASK) { |
@@ -482,11 +487,13 @@ static int ntfs_remount(struct super_block *sb, int *flags, char *opt) | |||
482 | "(0x%x) and is read-only%s", | 487 | "(0x%x) and is read-only%s", |
483 | (unsigned)le16_to_cpu(vol->vol_flags), | 488 | (unsigned)le16_to_cpu(vol->vol_flags), |
484 | es); | 489 | es); |
490 | unlock_kernel(); | ||
485 | return -EROFS; | 491 | return -EROFS; |
486 | } | 492 | } |
487 | if (ntfs_set_volume_flags(vol, VOLUME_IS_DIRTY)) { | 493 | if (ntfs_set_volume_flags(vol, VOLUME_IS_DIRTY)) { |
488 | ntfs_error(sb, "Failed to set dirty bit in volume " | 494 | ntfs_error(sb, "Failed to set dirty bit in volume " |
489 | "information flags%s", es); | 495 | "information flags%s", es); |
496 | unlock_kernel(); | ||
490 | return -EROFS; | 497 | return -EROFS; |
491 | } | 498 | } |
492 | #if 0 | 499 | #if 0 |
@@ -506,18 +513,21 @@ static int ntfs_remount(struct super_block *sb, int *flags, char *opt) | |||
506 | ntfs_error(sb, "Failed to empty journal $LogFile%s", | 513 | ntfs_error(sb, "Failed to empty journal $LogFile%s", |
507 | es); | 514 | es); |
508 | NVolSetErrors(vol); | 515 | NVolSetErrors(vol); |
516 | unlock_kernel(); | ||
509 | return -EROFS; | 517 | return -EROFS; |
510 | } | 518 | } |
511 | if (!ntfs_mark_quotas_out_of_date(vol)) { | 519 | if (!ntfs_mark_quotas_out_of_date(vol)) { |
512 | ntfs_error(sb, "Failed to mark quotas out of date%s", | 520 | ntfs_error(sb, "Failed to mark quotas out of date%s", |
513 | es); | 521 | es); |
514 | NVolSetErrors(vol); | 522 | NVolSetErrors(vol); |
523 | unlock_kernel(); | ||
515 | return -EROFS; | 524 | return -EROFS; |
516 | } | 525 | } |
517 | if (!ntfs_stamp_usnjrnl(vol)) { | 526 | if (!ntfs_stamp_usnjrnl(vol)) { |
518 | ntfs_error(sb, "Failed to stamp transation log " | 527 | ntfs_error(sb, "Failed to stamp transation log " |
519 | "($UsnJrnl)%s", es); | 528 | "($UsnJrnl)%s", es); |
520 | NVolSetErrors(vol); | 529 | NVolSetErrors(vol); |
530 | unlock_kernel(); | ||
521 | return -EROFS; | 531 | return -EROFS; |
522 | } | 532 | } |
523 | } else if (!(sb->s_flags & MS_RDONLY) && (*flags & MS_RDONLY)) { | 533 | } else if (!(sb->s_flags & MS_RDONLY) && (*flags & MS_RDONLY)) { |
@@ -533,8 +543,11 @@ static int ntfs_remount(struct super_block *sb, int *flags, char *opt) | |||
533 | 543 | ||
534 | // TODO: Deal with *flags. | 544 | // TODO: Deal with *flags. |
535 | 545 | ||
536 | if (!parse_options(vol, opt)) | 546 | if (!parse_options(vol, opt)) { |
547 | unlock_kernel(); | ||
537 | return -EINVAL; | 548 | return -EINVAL; |
549 | } | ||
550 | unlock_kernel(); | ||
538 | ntfs_debug("Done."); | 551 | ntfs_debug("Done."); |
539 | return 0; | 552 | return 0; |
540 | } | 553 | } |