diff options
author | Jan Kara <[email protected]> | 2008-04-28 02:16:13 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2008-04-28 08:58:45 -0700 |
commit | 07c9938a4e2c92b796b163dc70e99d3d1870aaee (patch) | |
tree | efdde08f88994f0c966781be5574adf8ea83d952 | |
parent | 0b23076988b44b2c165e060248345de6f2337387 (diff) |
ext3: fix hang on umount with quotas when journal is aborted
Call dquot_drop() from ext3_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 <[email protected]>
Cc: Payphone LIOU <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | fs/ext3/super.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index 770bbb4fa58c..03d5c626c1cd 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c @@ -2639,8 +2639,14 @@ static int ext3_dquot_drop(struct inode *inode) /* We may delete quota structure so we need to reserve enough blocks */ handle = ext3_journal_start(inode, 2*EXT3_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 = ext3_journal_stop(handle); if (!ret) |