summaryrefslogtreecommitdiff
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2018-12-15 09:31:07 +0300
committerDavid Sterba <dsterba@suse.com>2019-02-25 16:13:18 +0300
commitaa704d4e75c1ee4fe8eb6dc448955792fe19c96d (patch)
tree4f45ba3bd51f6c8b0eb2015b656d9fd12eaf5427 /fs/btrfs/ioctl.c
parent02950af4e3b7dbbb9c5483da4d93d53ed0fd27a8 (diff)
downloadlinux-aa704d4e75c1ee4fe8eb6dc448955792fe19c96d.tar.xz
btrfs: remove set but not used variable 'num_pages'
Fixes gcc '-Wunused-but-set-variable' warning: fs/btrfs/ioctl.c: In function 'btrfs_extent_same': fs/btrfs/ioctl.c:3260:6: warning: variable 'num_pages' set but not used [-Wunused-but-set-variable] It not used any more since commit 9ee8234e6220 ("Btrfs: use generic_remap_file_range_prep() for cloning and deduplication") Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r--fs/btrfs/ioctl.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 7ff60217ec55..4b5619127435 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -3278,7 +3278,6 @@ static int btrfs_extent_same(struct inode *src, u64 loff, u64 olen,
struct inode *dst, u64 dst_loff)
{
int ret;
- int num_pages = PAGE_ALIGN(BTRFS_MAX_DEDUPE_LEN) >> PAGE_SHIFT;
u64 i, tail_len, chunk_count;
/* don't make the dst file partly checksummed */
@@ -3291,8 +3290,6 @@ static int btrfs_extent_same(struct inode *src, u64 loff, u64 olen,
tail_len = olen % BTRFS_MAX_DEDUPE_LEN;
chunk_count = div_u64(olen, BTRFS_MAX_DEDUPE_LEN);
- if (chunk_count == 0)
- num_pages = PAGE_ALIGN(tail_len) >> PAGE_SHIFT;
for (i = 0; i < chunk_count; i++) {
ret = btrfs_extent_same_range(src, loff, BTRFS_MAX_DEDUPE_LEN,