Extents in the extent cluster are guaranteed to be contiguous as such the hole check inside the loop can never trigger. In fact this check was never functional since it was added in 18513091af948 which came after the commit introducing clustered/contiguous extents: 0257bb82d21b. Let's just remove it as it adds noise to the source. Signed-off-by: Nikolay Borisov <nborisov@xxxxxxxx> --- fs/btrfs/relocation.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 11d156995446..348985c8a559 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -2604,9 +2604,6 @@ int prealloc_file_extent_cluster(struct inode *inode, lock_extent(&BTRFS_I(inode)->io_tree, start, end); num_bytes = end + 1 - start; - if (cur_offset < start) - btrfs_free_reserved_data_space_noquota(inode, - start - cur_offset); ret = btrfs_prealloc_file_range(inode, 0, start, num_bytes, num_bytes, end + 1, &alloc_hint); -- 2.17.1
