summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_file.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2018-07-06 23:57:03 +0200
committerMiklos Szeredi <mszeredi@redhat.com>2018-07-06 23:57:03 +0200
commit5740c99e9d30b81fcc478797e7215c61e241f44e (patch)
treebb10f2f28245c18457980e307348492ea7d69602 /fs/xfs/xfs_file.c
parent92b66d2cdd7a4f6f6aa31be5f16a3f0c88902690 (diff)
vfs: dedupe: return int
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_file.c')
-rw-r--r--fs/xfs/xfs_file.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index a3e7767a5715..547ef7e8aec1 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -933,7 +933,7 @@ xfs_file_clone_range(
len, false);
}
-STATIC ssize_t
+STATIC int
xfs_file_dedupe_range(
struct file *src_file,
u64 loff,
@@ -941,23 +941,8 @@ xfs_file_dedupe_range(
struct file *dst_file,
u64 dst_loff)
{
- struct inode *srci = file_inode(src_file);
- u64 max_dedupe;
- int error;
-
- /*
- * Since we have to read all these pages in to compare them, cut
- * it off at MAX_RW_COUNT/2 rounded down to the nearest block.
- * That means we won't do more than MAX_RW_COUNT IO per request.
- */
- max_dedupe = (MAX_RW_COUNT >> 1) & ~(i_blocksize(srci) - 1);
- if (len > max_dedupe)
- len = max_dedupe;
- error = xfs_reflink_remap_range(src_file, loff, dst_file, dst_loff,
+ return xfs_reflink_remap_range(src_file, loff, dst_file, dst_loff,
len, true);
- if (error)
- return error;
- return len;
}
STATIC int