Skip to content

Commit

Permalink
reiserfs: fix hang on umount with quotas when journal is aborted
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Jan Kara authored and Linus Torvalds committed Apr 28, 2008
1 parent fbe5498 commit a2fe594
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion fs/reiserfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a2fe594

Please sign in to comment.