]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: log recovery, don't unlink inode always on error
authorFilipe David Borba Manana <fdmanana@gmail.com>
Mon, 28 Oct 2013 17:39:21 +0000 (17:39 +0000)
committerChris Mason <chris.mason@fusionio.com>
Tue, 12 Nov 2013 03:10:48 +0000 (22:10 -0500)
commit8ac2748517f344e34b126d8a551503e17c91c498
treecbbcf1d4fbda2043a88e7e4bf41c12dae4e92122
parentd6f90e3de07bfcf43a0639248350c6c21d5c1d82
Btrfs: log recovery, don't unlink inode always on error

If we get any error while doing a dir index/item lookup in the
log tree, we were always unlinking the corresponding inode in
the subvolume. It makes sense to unlink only if the lookup failed
to find the dir index/item, which corresponds to NULL or -ENOENT,
and not when other errors happen (like a transient -ENOMEM or -EIO).

Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/tree-log.c