]> git.hungrycats.org Git - linux/commitdiff
Revert "btrfs: pass unaligned length to btrfs_cmp_data()"
authorZygo Blaxell <zblaxell@serenity.furryterror.org>
Tue, 30 Jun 2015 23:59:48 +0000 (19:59 -0400)
committerZygo Blaxell <zblaxell@serenity.furryterror.org>
Tue, 30 Jun 2015 23:59:48 +0000 (19:59 -0400)
This reverts commit 7c3abddc9f33762a15f6189e652a96361e7a6372.

fs/btrfs/ioctl.c

index 2deea1fa79555ecbb54dc17390bcbe9e3e293c15..2d24ff4652e042c0e01aa91aba38f9ba8bd8d935 100644 (file)
@@ -2933,8 +2933,7 @@ static int btrfs_extent_same(struct inode *src, u64 loff, u64 olen,
                goto out_unlock;
        }
 
-       /* pass original length for comparison so we stay within i_size */
-       ret = btrfs_cmp_data(src, loff, dst, dst_loff, olen);
+       ret = btrfs_cmp_data(src, loff, dst, dst_loff, len);
        if (ret == 0)
                ret = btrfs_clone(src, dst, loff, olen, len, dst_loff);