• Josef Bacik's avatar
    Btrfs: do not merge logged extents if we've removed them from the tree · 222c81dc
    Josef Bacik authored
    You can run into this problem where if somebody is fsyncing and writing out
    the existing extents you will have removed the extent map from the em tree,
    but it's still valid for the current fsync so we go ahead and write it.  The
    problem is we unconditionally try to merge it back into the em tree, but if
    we've removed it from the em tree that will cause use after free problems.
    Fix this to only merge if we are still a part of the tree.  Thanks,
    Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
    222c81dc
extent_map.c 10.5 KB