]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - fs/btrfs/extent_map.c
Btrfs: do not merge logged extents if we've removed them from the tree
[~shefty/rdma-dev.git] / fs / btrfs / extent_map.c
index ed88f5ee4beab19bf1ad0bf8a465c815156f1817..9759911dd34e12365c0bc57e2a943d55c00a126c 100644 (file)
@@ -289,7 +289,8 @@ out:
 void clear_em_logging(struct extent_map_tree *tree, struct extent_map *em)
 {
        clear_bit(EXTENT_FLAG_LOGGING, &em->flags);
 void clear_em_logging(struct extent_map_tree *tree, struct extent_map *em)
 {
        clear_bit(EXTENT_FLAG_LOGGING, &em->flags);
-       try_merge_map(tree, em);
+       if (em->in_tree)
+               try_merge_map(tree, em);
 }
 
 /**
 }
 
 /**