]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext3: Fix fs corruption when make_indexed_dir() fails
authorJan Kara <jack@suse.cz>
Wed, 27 Apr 2011 16:20:44 +0000 (18:20 +0200)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 17 May 2012 15:20:27 +0000 (11:20 -0400)
commit81670d15f4a3795d6645e7dd236e8e2fefe8e1d2
tree15163a24e77ab526a8a800d9c831105e49e3a0e3
parentd440d589a8b4f4ebe2b227268ab55b67a588aa2b
ext3: Fix fs corruption when make_indexed_dir() fails

commit 86c4f6d85595cd7da635dc6985d27bfa43b1ae10 upstream.

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.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
fs/ext3/namei.c