• Josef Bacik's avatar
    Btrfs: do not clear our orphan item runtime flag on eexist · e8e7cff6
    Josef Bacik authored
    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: default avatarJosef Bacik <jbacik@fusionio.com>
    Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
    e8e7cff6
inode.c 228 KB