summaryrefslogtreecommitdiffstats
path: root/fs/read_write.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2018-10-29 19:42:24 -0400
committerDave Chinner <david@fromorbit.com>2018-10-29 19:42:24 -0400
commit8c5c836bd6c3b9f9fc1c5a210d630b8c42f4f7df (patch)
treeb30d576876330782bc620907b9693f5b20ef4ea7 /fs/read_write.c
parentc32e5f39953fa6bbff35c655bdcb7b3128f1e79f (diff)
vfs: clean up generic_remap_file_range_prep return value
Since the remap prep function can update the length of the remap request, we can change this function to return the usual return status instead of the odd behavior it has now. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/read_write.c')
-rw-r--r--fs/read_write.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/read_write.c b/fs/read_write.c
index e4d295d0d236..6b40a43edf18 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -1848,8 +1848,8 @@ out_error:
1848 * sense, and then flush all dirty data. Caller must ensure that the 1848 * sense, and then flush all dirty data. Caller must ensure that the
1849 * inodes have been locked against any other modifications. 1849 * inodes have been locked against any other modifications.
1850 * 1850 *
1851 * Returns: 0 for "nothing to clone", 1 for "something to clone", or 1851 * If there's an error, then the usual negative error code is returned.
1852 * the usual negative error code. 1852 * Otherwise returns 0 with *len set to the request length.
1853 */ 1853 */
1854int generic_remap_file_range_prep(struct file *file_in, loff_t pos_in, 1854int generic_remap_file_range_prep(struct file *file_in, loff_t pos_in,
1855 struct file *file_out, loff_t pos_out, 1855 struct file *file_out, loff_t pos_out,
@@ -1945,7 +1945,7 @@ int generic_remap_file_range_prep(struct file *file_in, loff_t pos_in,
1945 return ret; 1945 return ret;
1946 } 1946 }
1947 1947
1948 return 1; 1948 return 0;
1949} 1949}
1950EXPORT_SYMBOL(generic_remap_file_range_prep); 1950EXPORT_SYMBOL(generic_remap_file_range_prep);
1951 1951