diff options
Diffstat (limited to 'fs/ext3')
-rw-r--r-- | fs/ext3/super.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index 0fc1293d0e96..d0f8837b6255 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c | |||
@@ -2551,6 +2551,7 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data) | |||
2551 | ext3_fsblk_t n_blocks_count = 0; | 2551 | ext3_fsblk_t n_blocks_count = 0; |
2552 | unsigned long old_sb_flags; | 2552 | unsigned long old_sb_flags; |
2553 | struct ext3_mount_options old_opts; | 2553 | struct ext3_mount_options old_opts; |
2554 | int enable_quota = 0; | ||
2554 | int err; | 2555 | int err; |
2555 | #ifdef CONFIG_QUOTA | 2556 | #ifdef CONFIG_QUOTA |
2556 | int i; | 2557 | int i; |
@@ -2597,6 +2598,12 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data) | |||
2597 | } | 2598 | } |
2598 | 2599 | ||
2599 | if (*flags & MS_RDONLY) { | 2600 | if (*flags & MS_RDONLY) { |
2601 | err = vfs_dq_off(sb, 1); | ||
2602 | if (err < 0 && err != -ENOSYS) { | ||
2603 | err = -EBUSY; | ||
2604 | goto restore_opts; | ||
2605 | } | ||
2606 | |||
2600 | /* | 2607 | /* |
2601 | * First of all, the unconditional stuff we have to do | 2608 | * First of all, the unconditional stuff we have to do |
2602 | * to disable replay of the journal when we next remount | 2609 | * to disable replay of the journal when we next remount |
@@ -2651,6 +2658,7 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data) | |||
2651 | goto restore_opts; | 2658 | goto restore_opts; |
2652 | if (!ext3_setup_super (sb, es, 0)) | 2659 | if (!ext3_setup_super (sb, es, 0)) |
2653 | sb->s_flags &= ~MS_RDONLY; | 2660 | sb->s_flags &= ~MS_RDONLY; |
2661 | enable_quota = 1; | ||
2654 | } | 2662 | } |
2655 | } | 2663 | } |
2656 | #ifdef CONFIG_QUOTA | 2664 | #ifdef CONFIG_QUOTA |
@@ -2662,6 +2670,9 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data) | |||
2662 | #endif | 2670 | #endif |
2663 | unlock_super(sb); | 2671 | unlock_super(sb); |
2664 | unlock_kernel(); | 2672 | unlock_kernel(); |
2673 | |||
2674 | if (enable_quota) | ||
2675 | vfs_dq_quota_on_remount(sb); | ||
2665 | return 0; | 2676 | return 0; |
2666 | restore_opts: | 2677 | restore_opts: |
2667 | sb->s_flags = old_sb_flags; | 2678 | sb->s_flags = old_sb_flags; |