reiserfs: fix hang on umount with quotas when journal is aborted
authorJan Kara <jack@suse.cz>
Mon, 28 Apr 2008 09:16:23 +0000 (02:16 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 28 Apr 2008 15:58:46 +0000 (08:58 -0700)
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>
fs/reiserfs/super.c

index f8f9a473e6704374786459f0066d40e569c15323..a4c9770a6012db12a8f531a05a96f3f908daa3b7 100644 (file)
@@ -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,