summaryrefslogtreecommitdiff
path: root/fs/reiserfs
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2008-04-28 02:16:23 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 08:58:46 -0700
commita2fe594fa3732298947377409b5d8111b14f56ec (patch)
treeefd71f35949123fdaaf5d986e3237a059958fbfc /fs/reiserfs
parentfbe5498b3d5af44a8671800e85b2858c2ea236fa (diff)
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. 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>
Diffstat (limited to 'fs/reiserfs')
-rw-r--r--fs/reiserfs/super.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index f8f9a473e670..a4c9770a6012 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -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,