summaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2016-12-20 00:13:26 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2016-12-23 05:00:23 +0100
commit22725ce4e4a00fbc37694e25dc5c8acef8ad1c28 (patch)
treec2f79e95c3aba6279faa3967a14ac9cd0d629022 /fs/xfs
parent[iov_iter] fix iterate_all_kinds() on empty iterators (diff)
downloadlinux-22725ce4e4a00fbc37694e25dc5c8acef8ad1c28.tar.xz
linux-22725ce4e4a00fbc37694e25dc5c8acef8ad1c28.zip
vfs: fix isize/pos/len checks for reflink & dedupe
Strengthen the checking of pos/len vs. i_size, clarify the return values for the clone prep function, and remove pointless code. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_reflink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c
index aca2d4bd4303..07593a362cd0 100644
--- a/fs/xfs/xfs_reflink.c
+++ b/fs/xfs/xfs_reflink.c
@@ -1161,7 +1161,7 @@ xfs_reflink_remap_range(
ret = vfs_clone_file_prep_inodes(inode_in, pos_in, inode_out, pos_out,
&len, is_dedupe);
- if (ret || len == 0)
+ if (ret <= 0)
goto out_unlock;
trace_xfs_reflink_remap_range(src, pos_in, len, dest, pos_out);