]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: do not merge logged extents if we've removed them from the tree
authorJosef Bacik <jbacik@fusionio.com>
Mon, 28 Jan 2013 14:45:20 +0000 (09:45 -0500)
committerJosef Bacik <jbacik@fusionio.com>
Tue, 5 Feb 2013 21:09:03 +0000 (16:09 -0500)
commit169d869631cf1ed2a6fd0373afbe9c6b1e6f4b21
tree534dba9dae10fa3b8cdc4111176b3ec7450e922b
parent57a00b601c27d455f19f52cf0e1833b2d56f38d9
Btrfs: do not merge logged extents if we've removed them from the tree

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: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/extent_map.c