]> 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)
commit077c67bcdfbb18d0f91cf01c9c60b676ea131032
treecbbcf1d4fbda2043a88e7e4bf41c12dae4e92122
parent90f5c78f3d9740c216e094ee926268994722ae4e
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