ext3: Avoid filesystem corruption after a crash under heavy delete load
authorJan Kara <jack@suse.cz>
Mon, 12 Jul 2010 19:04:31 +0000 (21:04 +0200)
committerJan Kara <jack@suse.cz>
Wed, 21 Jul 2010 14:04:26 +0000 (16:04 +0200)
commitf25f624263445785b94f39739a6339ba9ed3275d
tree8ec38c718b0af19d6e9cbbc9f368c43d7af14b9b
parent4c4d3901225518ed1a4c938ba15ba09842a00770
ext3: Avoid filesystem corruption after a crash under heavy delete load

It can happen that ext3_free_branches calls ext3_forget() for an indirect block
in an earlier transaction than a transaction in which we clear pointer to this
indirect block. Thus if we crash before a transaction clearing the block
pointer is committed, we will see indirect block pointing to already freed
blocks and complain during orphan list cleanup.

The fix is simple: Make sure ext3_forget() is called in the transaction
doing block pointer clearing.

This is a backport of an ext4 fix by Amir G. <amir73il@users.sourceforge.net>

Signed-off-by: Jan Kara <jack@suse.cz>
fs/ext3/inode.c