diff options
-rw-r--r-- | fs/btrfs/ioctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index f914b5db7ff1..1ae45bd9d27d 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -983,7 +983,8 @@ static bool defrag_check_next_extent(struct inode *inode, struct extent_map *em) | |||
983 | return false; | 983 | return false; |
984 | 984 | ||
985 | next = defrag_lookup_extent(inode, em->start + em->len); | 985 | next = defrag_lookup_extent(inode, em->start + em->len); |
986 | if (!next || next->block_start >= EXTENT_MAP_LAST_BYTE) | 986 | if (!next || next->block_start >= EXTENT_MAP_LAST_BYTE || |
987 | (em->block_start + em->block_len == next->block_start)) | ||
987 | ret = false; | 988 | ret = false; |
988 | 989 | ||
989 | free_extent_map(next); | 990 | free_extent_map(next); |