Skip to contentSkip to conversation

reiserfs: Fix hang on umount with quotas when journal is aborted

PATCH New Jan Kara 1 participant 1 message Apr 2, 2008

lore
Share & tools
lore

Jan Kara

author
#0 lore raw

PATCH 1/1 reiserfs: Fix hang on umount with quotas when journal is aborted

Call dquot_drop() from reiserfs_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.

---
 fs/reiserfs/super.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
fs/reiserfs/super.c +7 -1
index 393cc22..65e17e1 100644
@@ -1890,8 +1890,14 @@ static int reiserfs_dquot_drop(struct inode *inode)
 	ret =
 	    journal_begin(&th, inode->i_sb,
 			  2 * REISERFS_QUOTA_DEL_BLOCKS(inode->i_sb));
-	if (ret)
+	if (ret) {
+		/*
+		 * We call dquot_drop() anyway to at least release references
+		 * to quota structures so that umount does not hang.
+		 */
+		dquot_drop(inode);
 		goto out;
+	}
 	ret = dquot_drop(inode);
 	err =
 	    journal_end(&th, inode->i_sb,
Signature · 1 line
1.5.2.4