]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
vfs: rename vfs_clone_file_prep to be more descriptive
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 29 Oct 2018 23:41:08 +0000 (10:41 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 29 Oct 2018 23:41:08 +0000 (10:41 +1100)
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>
fs/ocfs2/refcounttree.c
fs/read_write.c
fs/xfs/xfs_reflink.c
include/linux/fs.h

index 19e03936c5e1ab153442eb2149946fc486a587d9..36c56dfbe4853ad1b69e0cb6b725d29d7df28c0a 100644 (file)
@@ -4850,7 +4850,7 @@ int ocfs2_reflink_remap_range(struct file *file_in,
            (OCFS2_I(inode_out)->ip_flags & OCFS2_INODE_SYSTEM_FILE))
                goto out_unlock;
 
-       ret = vfs_clone_file_prep(file_in, pos_in, file_out, pos_out,
+       ret = generic_remap_file_range_prep(file_in, pos_in, file_out, pos_out,
                        &len, is_dedupe);
        if (ret <= 0)
                goto out_unlock;
index f5395d8da741eca048d1367c54232bdc72983aea..aca75a97a695346ff79a246b8ce78668ccfc986a 100644 (file)
@@ -1745,9 +1745,9 @@ static int generic_remap_check_len(struct inode *inode_in,
  * Returns: 0 for "nothing to clone", 1 for "something to clone", or
  * the usual negative error code.
  */
-int vfs_clone_file_prep(struct file *file_in, loff_t pos_in,
-                       struct file *file_out, loff_t pos_out,
-                       u64 *len, bool is_dedupe)
+int generic_remap_file_range_prep(struct file *file_in, loff_t pos_in,
+                                 struct file *file_out, loff_t pos_out,
+                                 u64 *len, bool is_dedupe)
 {
        struct inode *inode_in = file_inode(file_in);
        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,
 
        return 1;
 }
-EXPORT_SYMBOL(vfs_clone_file_prep);
+EXPORT_SYMBOL(generic_remap_file_range_prep);
 
 int do_clone_file_range(struct file *file_in, loff_t pos_in,
                        struct file *file_out, loff_t pos_out, u64 len)
index 281d5f53f2ec2117c1288a188102683d19546128..a7757a128a78fcf8d8f3bd1f190c3524c733cf8f 100644 (file)
@@ -1326,7 +1326,7 @@ xfs_reflink_remap_prep(
        if (IS_DAX(inode_in) || IS_DAX(inode_out))
                goto out_unlock;
 
-       ret = vfs_clone_file_prep(file_in, pos_in, file_out, pos_out,
+       ret = generic_remap_file_range_prep(file_in, pos_in, file_out, pos_out,
                        len, is_dedupe);
        if (ret <= 0)
                goto out_unlock;
index ba93a6e7dac4ec1c6f81e8bc19fed30061671df8..55729e1c2e759a68af0ec7d8abe0ea2ab06b37b6 100644 (file)
@@ -1825,9 +1825,9 @@ extern ssize_t vfs_readv(struct file *, const struct iovec __user *,
                unsigned long, loff_t *, rwf_t);
 extern ssize_t vfs_copy_file_range(struct file *, loff_t , struct file *,
                                   loff_t, size_t, unsigned int);
-extern int vfs_clone_file_prep(struct file *file_in, loff_t pos_in,
-                              struct file *file_out, loff_t pos_out,
-                              u64 *count, bool is_dedupe);
+extern int generic_remap_file_range_prep(struct file *file_in, loff_t pos_in,
+                                        struct file *file_out, loff_t pos_out,
+                                        u64 *count, bool is_dedupe);
 extern int do_clone_file_range(struct file *file_in, loff_t pos_in,
                               struct file *file_out, loff_t pos_out, u64 len);
 extern int vfs_clone_file_range(struct file *file_in, loff_t pos_in,