]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ext4: drop inode from orphan list if ext4_delete_inode() fails
authorTheodore Ts'o <tytso@mit.edu>
Thu, 29 Jul 2010 19:06:10 +0000 (15:06 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 29 Jul 2010 19:06:10 +0000 (15:06 -0400)
There were some error paths in ext4_delete_inode() which was not
dropping the inode from the orphan list.  This could lead to a BUG_ON
on umount when the orphan list is discovered to be non-empty.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/inode.c

index a52d5af99187a6d53a11de0b3927319f96b87b74..533b607f9cb5cd20026f7f0c21a00800fabc58c5 100644 (file)
@@ -221,6 +221,7 @@ void ext4_delete_inode(struct inode *inode)
                                     "couldn't extend journal (err %d)", err);
                stop_handle:
                        ext4_journal_stop(handle);
+                       ext4_orphan_del(NULL, inode);
                        goto no_delete;
                }
        }