From: Jan Kara 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 Signed-off-by: Andrew Morton --- fs/ext4/super.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff -puN fs/ext4/super.c~ext4-fix-hang-on-umount-with-quotas-when-journal-is-aborted fs/ext4/super.c --- a/fs/ext4/super.c~ext4-fix-hang-on-umount-with-quotas-when-journal-is-aborted +++ a/fs/ext4/super.c @@ -3039,8 +3039,14 @@ static int ext4_dquot_drop(struct 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) _