diff options
author | Jan Kara <jack@suse.cz> | 2008-02-08 07:22:13 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-08 12:22:44 -0500 |
commit | 66191dc622f5ff0a541524c4e96fdacfacfda206 (patch) | |
tree | 6bd6c7402d5f71f43c161e694d04c535ffc98b57 /fs/super.c | |
parent | 28ae094c625a9b719c01cf5ec45b8640e6911f53 (diff) |
quota: turn quotas off when remounting read-only
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>
Diffstat (limited to 'fs/super.c')
-rw-r--r-- | fs/super.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/super.c b/fs/super.c index 65f6849847f4..88811f60c8de 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -604,6 +604,7 @@ int do_remount_sb(struct super_block *sb, int flags, void *data, int force) | |||
604 | mark_files_ro(sb); | 604 | mark_files_ro(sb); |
605 | else if (!fs_may_remount_ro(sb)) | 605 | else if (!fs_may_remount_ro(sb)) |
606 | return -EBUSY; | 606 | return -EBUSY; |
607 | DQUOT_OFF(sb); | ||
607 | } | 608 | } |
608 | 609 | ||
609 | if (sb->s_op->remount_fs) { | 610 | if (sb->s_op->remount_fs) { |