public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] quota: Turn quotas off when remounting read-only
@ 2008-02-07 14:37 Jan Kara
  2008-02-07 18:36 ` Andrew Morton
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kara @ 2008-02-07 14:37 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Michael Tokarev

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>
---
Andrew, this should fix the hang reported... Please apply. Thanks.

diff --git a/fs/super.c b/fs/super.c
index ceaf2e3..945c322 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -603,6 +603,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) {

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-02-15 14:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-07 14:37 [PATCH] quota: Turn quotas off when remounting read-only Jan Kara
2008-02-07 18:36 ` Andrew Morton
2008-02-07 19:27   ` Michael Tokarev
2008-02-11 12:39     ` Jan Kara
2008-02-15 14:10       ` Jan Engelhardt
2008-02-15 14:21         ` Michael Tokarev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox