aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2018-10-29 19:41:08 -0400
committerDave Chinner <david@fromorbit.com>2018-10-29 19:41:08 -0400
commita83ab01a62e61616ebb8b97f90f568c1214dc10d (patch)
treef37ee538e5b0a07fc1ead17e104820a64b16f804
parent9aae20500d9cd3e7d55d0536d359bdd1c869db89 (diff)
vfs: rename vfs_clone_file_prep to be more descriptive
The vfs_clone_file_prep is a generic function to be called by filesystem implementations only. Rename the prefix to generic_ and make it more clear that it applies to remap operations, not just clones. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
-rw-r--r--fs/ocfs2/refcounttree.c2
-rw-r--r--fs/read_write.c8
-rw-r--r--fs/xfs/xfs_reflink.c2
-rw-r--r--include/linux/fs.h6
4 files changed, 9 insertions, 9 deletions
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c
index 19e03936c5e1..36c56dfbe485 100644
--- a/fs/ocfs2/refcounttree.c
+++ b/fs/ocfs2/refcounttree.c
@@ -4850,7 +4850,7 @@ int ocfs2_reflink_remap_range(struct file *file_in,
4850 (OCFS2_I(inode_out)->ip_flags & OCFS2_INODE_SYSTEM_FILE)) 4850 (OCFS2_I(inode_out)->ip_flags & OCFS2_INODE_SYSTEM_FILE))
4851 goto out_unlock; 4851 goto out_unlock;
4852 4852
4853 ret = vfs_clone_file_prep(file_in, pos_in, file_out, pos_out, 4853 ret = generic_remap_file_range_prep(file_in, pos_in, file_out, pos_out,
4854 &len, is_dedupe); 4854 &len, is_dedupe);
4855 if (ret <= 0) 4855 if (ret <= 0)
4856 goto out_unlock; 4856 goto out_unlock;
diff --git a/fs/read_write.c b/fs/read_write.c
index f5395d8da741..aca75a97a695 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -1745,9 +1745,9 @@ static int generic_remap_check_len(struct inode *inode_in,
1745 * Returns: 0 for "nothing to clone", 1 for "something to clone", or 1745 * Returns: 0 for "nothing to clone", 1 for "something to clone", or
1746 * the usual negative error code. 1746 * the usual negative error code.
1747 */ 1747 */
1748int vfs_clone_file_prep(struct file *file_in, loff_t pos_in, 1748int generic_remap_file_range_prep(struct file *file_in, loff_t pos_in,
1749 struct file *file_out, loff_t pos_out, 1749 struct file *file_out, loff_t pos_out,
1750 u64 *len, bool is_dedupe) 1750 u64 *len, bool is_dedupe)
1751{ 1751{
1752 struct inode *inode_in = file_inode(file_in); 1752 struct inode *inode_in = file_inode(file_in);
1753 struct inode *inode_out = file_inode(file_out); 1753 struct inode *inode_out = file_inode(file_out);
@@ -1822,7 +1822,7 @@ int vfs_clone_file_prep(struct file *file_in, loff_t pos_in,
1822 1822
1823 return 1; 1823 return 1;
1824} 1824}
1825EXPORT_SYMBOL(vfs_clone_file_prep); 1825EXPORT_SYMBOL(generic_remap_file_range_prep);
1826 1826
1827int do_clone_file_range(struct file *file_in, loff_t pos_in, 1827int do_clone_file_range(struct file *file_in, loff_t pos_in,
1828 struct file *file_out, loff_t pos_out, u64 len) 1828 struct file *file_out, loff_t pos_out, u64 len)
diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c
index 281d5f53f2ec..a7757a128a78 100644
--- a/fs/xfs/xfs_reflink.c
+++ b/fs/xfs/xfs_reflink.c
@@ -1326,7 +1326,7 @@ xfs_reflink_remap_prep(
1326 if (IS_DAX(inode_in) || IS_DAX(inode_out)) 1326 if (IS_DAX(inode_in) || IS_DAX(inode_out))
1327 goto out_unlock; 1327 goto out_unlock;
1328 1328
1329 ret = vfs_clone_file_prep(file_in, pos_in, file_out, pos_out, 1329 ret = generic_remap_file_range_prep(file_in, pos_in, file_out, pos_out,
1330 len, is_dedupe); 1330 len, is_dedupe);
1331 if (ret <= 0) 1331 if (ret <= 0)
1332 goto out_unlock; 1332 goto out_unlock;
diff --git a/include/linux/fs.h b/include/linux/fs.h
index ba93a6e7dac4..55729e1c2e75 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1825,9 +1825,9 @@ extern ssize_t vfs_readv(struct file *, const struct iovec __user *,
1825 unsigned long, loff_t *, rwf_t); 1825 unsigned long, loff_t *, rwf_t);
1826extern ssize_t vfs_copy_file_range(struct file *, loff_t , struct file *, 1826extern ssize_t vfs_copy_file_range(struct file *, loff_t , struct file *,
1827 loff_t, size_t, unsigned int); 1827 loff_t, size_t, unsigned int);
1828extern int vfs_clone_file_prep(struct file *file_in, loff_t pos_in, 1828extern int generic_remap_file_range_prep(struct file *file_in, loff_t pos_in,
1829 struct file *file_out, loff_t pos_out, 1829 struct file *file_out, loff_t pos_out,
1830 u64 *count, bool is_dedupe); 1830 u64 *count, bool is_dedupe);
1831extern int do_clone_file_range(struct file *file_in, loff_t pos_in, 1831extern int do_clone_file_range(struct file *file_in, loff_t pos_in,
1832 struct file *file_out, loff_t pos_out, u64 len); 1832 struct file *file_out, loff_t pos_out, u64 len);
1833extern int vfs_clone_file_range(struct file *file_in, loff_t pos_in, 1833extern int vfs_clone_file_range(struct file *file_in, loff_t pos_in,