]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: pass unaligned length to btrfs_cmp_data()
authorMark Fasheh <mfasheh@suse.de>
Tue, 30 Jun 2015 21:42:04 +0000 (14:42 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Tue, 22 Aug 2017 15:42:58 +0000 (08:42 -0700)
commite08fe6d0fac9ea5729a75ac396600c7582434c2d
tree326c4b7ef91519016dd40d7b1889f51517a9e43f
parent2df95d69537c471a542ecfcb8d56520c6da15c07
btrfs: pass unaligned length to btrfs_cmp_data()

In the case that we dedupe the tail of a file, we might expand the dedupe
len out to the end of our last block. We don't want to compare data past
i_size however, so pass the original length to btrfs_cmp_data().

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
(Cherry picked from commit 207910ddeeda38fd54544d94f8c8ca5a9632cc25)

Orabug: 26251039

Signed-off-by: Shan Hai <shan.hai@oracle.com>
Acked-by: Shannon Nelson <shannon.nelson@oracle.com>
Acked-by: John Haxby <john.haxby@oracle.com>
fs/btrfs/ioctl.c