]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: do not clear our orphan item runtime flag on eexist
authorJosef Bacik <jbacik@fusionio.com>
Wed, 21 Aug 2013 19:54:00 +0000 (15:54 -0400)
committerChris Mason <chris.mason@fusionio.com>
Sun, 1 Sep 2013 12:16:22 +0000 (08:16 -0400)
commit5956ae4041f723f96fe6b039371c6d9269229b36
treefe258a54a8a8cc8145a8abf299b754779277ba3b
parentc654db6e582ae5ffb6abd5e8e9423a9f74cb1aef
Btrfs: do not clear our orphan item runtime flag on eexist

We were unconditionally clearing our runtime flag on the inode on error when
trying to insert an orphan item.  This is wrong in the case of -EEXIST since we
obviously have an orphan item.  This was causing us to not do the correct
cleanup of our orphan items which caused issues on cleanup.  This happens
because currently when truncate fails we just leave the orphan item on there so
it can be cleaned up, so if we go to remove the file later we will hit this
issue.  What we do for truncate isn't right either, but we shouldn't screw this
sort of thing up on error either, so fix this and then I'll fix truncate in a
different patch.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/inode.c