LKML Archive on
help / color / mirror / Atom feed
* [PATCH] ext4: Fix hang on umount with quotas when journal is aborted
@ 2008-04-02  9:10 Jan Kara
  0 siblings, 0 replies; only message in thread
From: Jan Kara @ 2008-04-02  9:10 UTC (permalink / raw)
  To: linux-ext4; +Cc: Payphone LIOU, Andrew Morton, linux-kernel

Call dquot_drop() from ext4_dquot_drop() even if we fail to start a
transaction. Otherwise we never get to dropping references to quota structures
from the inode and umount will hang indefinitely.  Thanks to Payphone LIOU for
spotting the problem.

Signed-off-by: Jan Kara <>
CC: Payphone LIOU <>

  I'm not sure if this should go through ext4 patch queue or through Andrew.
It should not collide with anything so it probably does not matter much...

 fs/ext4/super.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 13383ba..286acec 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3039,8 +3039,14 @@ static int ext4_dquot_drop(struct inode *inode)
 	/* We may delete quota structure so we need to reserve enough blocks */
 	handle = ext4_journal_start(inode, 2*EXT4_QUOTA_DEL_BLOCKS(inode->i_sb));
-	if (IS_ERR(handle))
+	if (IS_ERR(handle)) {
+		/*
+		 * We call dquot_drop() anyway to at least release references
+		 * to quota structures so that umount does not hang.
+		 */
+		dquot_drop(inode);
 		return PTR_ERR(handle);
+	}
 	ret = dquot_drop(inode);
 	err = ext4_journal_stop(handle);
 	if (!ret)

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-04-02  9:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-02  9:10 [PATCH] ext4: Fix hang on umount with quotas when journal is aborted Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).