Skip to content

Commit

Permalink
quota: turn quotas off when remounting read-only
Browse files Browse the repository at this point in the history
Turn off quotas before filesystem is remounted read only.  Otherwise quota
will try to write to read-only filesystem which does no good...  We could
also just refuse to remount ro when quota is enabled but turning quota off
is consistent with what we do on umount.

Signed-off-by: Jan Kara <jack@suse.cz>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Jan Kara authored and Linus Torvalds committed Feb 8, 2008
1 parent 28ae094 commit 66191dc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@ int do_remount_sb(struct super_block *sb, int flags, void *data, int force)
mark_files_ro(sb);
else if (!fs_may_remount_ro(sb))
return -EBUSY;
DQUOT_OFF(sb);
}

if (sb->s_op->remount_fs) {
Expand Down

0 comments on commit 66191dc

Please sign in to comment.