[PATCH] quota: Turn quotas off when remounting read-only

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jan Kara
Date: Thursday, February 7, 2008 - 7:37 am

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) {
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] quota: Turn quotas off when remounting read-only, Jan Kara, (Thu Feb 7, 7:37 am)
Re: [PATCH] quota: Turn quotas off when remounting read-only, Michael Tokarev, (Thu Feb 7, 12:27 pm)
Re: [PATCH] quota: Turn quotas off when remounting read-only, Michael Tokarev, (Fri Feb 15, 7:21 am)