ext3: Fix fs corruption when make_indexed_dir() fails
commit86c4f6d85595cd7da635dc6985d27bfa43b1ae10
authorJan Kara <jack@suse.cz>
Wed, 27 Apr 2011 16:20:44 +0000 (27 18:20 +0200)
committerJan Kara <jack@suse.cz>
Tue, 17 May 2011 11:47:15 +0000 (17 13:47 +0200)
treeef129a2eebdf5cfbecc0ddfbef96b26590242c3d
parentae54870a1dc978a88377ae8af0780648f2ccd4dc
ext3: Fix fs corruption when make_indexed_dir() fails

When make_indexed_dir() fails (e.g. because of ENOSPC) after it has allocated
block for index tree root, we did not properly mark all changed buffers dirty.
This lead to only some of these buffers being written out and thus effectively
corrupting the directory.

Fix the issue by marking all changed data dirty even in the error failure case.

CC: stable@kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
fs/ext3/namei.c