We can never have extents marked as EXTENT_MAP_DELALLOC since this
value is only ever used by btrfs_get_extent_fiemap. In this case the
extent map is created by btrfs_get_extent_fiemap and is never really
published, this flag is used to return the corresponding userspace one.
Considering this, it's pointless having a check for EXTENT_MAP_DELALLOC
in mergable_maps. Just remove it.

Signed-off-by: Nikolay Borisov <[email protected]>
---
 fs/btrfs/extent_map.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c
index 7eea8b6e2cd3..7cc893876f83 100644
--- a/fs/btrfs/extent_map.c
+++ b/fs/btrfs/extent_map.c
@@ -217,8 +217,6 @@ static int mergable_maps(struct extent_map *prev, struct 
extent_map *next)
              prev->block_start == EXTENT_MAP_HOLE) ||
             (next->block_start == EXTENT_MAP_INLINE &&
              prev->block_start == EXTENT_MAP_INLINE) ||
-            (next->block_start == EXTENT_MAP_DELALLOC &&
-             prev->block_start == EXTENT_MAP_DELALLOC) ||
             (next->block_start < EXTENT_MAP_LAST_BYTE - 1 &&
              next->block_start == extent_map_block_end(prev)))) {
                return 1;
-- 
2.17.1

Reply via email to