ext3: Fix error handling on inode bitmap corruption
commitba57e38b830f274138a0349c4aef75d4c75e95a0
authorJan Kara <jack@suse.cz>
Thu, 8 Dec 2011 20:13:46 +0000 (8 21:13 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 7 Oct 2012 21:37:50 +0000 (7 23:37 +0200)
treef0a885d10864e960723d91fa391625517f6115bb
parent5816579f8bf88fd799401543877c13fab425dc5e
ext3: Fix error handling on inode bitmap corruption

commit 1415dd8705394399d59a3df1ab48d149e1e41e77 upstream.

When insert_inode_locked() fails in ext3_new_inode() it most likely
means inode bitmap got corrupted and we allocated again inode which
is already in use. Also doing unlock_new_inode() during error recovery
is wrong since inode does not have I_NEW set. Fix the problem by jumping
to fail: (instead of fail_drop:) which declares filesystem error and
does not call unlock_new_inode().

Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
fs/ext3/ialloc.c