summaryrefslogtreecommitdiff
path: root/fs/ocfs2/file.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2018-10-30 02:44:45 +0300
committerDave Chinner <david@fromorbit.com>2018-10-30 02:44:45 +0300
commit900611a1bd06ef4a79980e58babc61ef056c81ab (patch)
tree1d1d62cc0bf025f450cae70d2e5f278d089eb0e3 /fs/ocfs2/file.c
parenta8a94302c9754d05069ee149cf01df8aa5116aaa (diff)
downloadlinux-900611a1bd06ef4a79980e58babc61ef056c81ab.tar.xz
ocfs2: support partial clone range and dedupe range
Change the ocfs2 remap code to allow for returning partial results. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/ocfs2/file.c')
-rw-r--r--fs/ocfs2/file.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index fbaeafe44b5f..8125c5ccf821 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -2531,14 +2531,11 @@ static loff_t ocfs2_remap_file_range(struct file *file_in, loff_t pos_in,
struct file *file_out, loff_t pos_out,
loff_t len, unsigned int remap_flags)
{
- int ret;
-
if (remap_flags & ~(REMAP_FILE_DEDUP | REMAP_FILE_ADVISORY))
return -EINVAL;
- ret = ocfs2_reflink_remap_range(file_in, pos_in, file_out, pos_out,
- len, remap_flags);
- return ret < 0 ? ret : len;
+ return ocfs2_reflink_remap_range(file_in, pos_in, file_out, pos_out,
+ len, remap_flags);
}
const struct inode_operations ocfs2_file_iops = {