|
@@ -1828,8 +1828,10 @@ extern ssize_t vfs_copy_file_range(struct file *, loff_t , struct file *,
|
|
|
extern int vfs_clone_file_prep_inodes(struct inode *inode_in, loff_t pos_in,
|
|
|
struct inode *inode_out, loff_t pos_out,
|
|
|
u64 *len, 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,
|
|
|
- struct file *file_out, loff_t pos_out, u64 len);
|
|
|
+ struct file *file_out, loff_t pos_out, u64 len);
|
|
|
extern int vfs_dedupe_file_range_compare(struct inode *src, loff_t srcoff,
|
|
|
struct inode *dest, loff_t destoff,
|
|
|
loff_t len, bool *is_same);
|
|
@@ -2773,19 +2775,6 @@ static inline void file_end_write(struct file *file)
|
|
|
__sb_end_write(file_inode(file)->i_sb, SB_FREEZE_WRITE);
|
|
|
}
|
|
|
|
|
|
-static inline int do_clone_file_range(struct file *file_in, loff_t pos_in,
|
|
|
- struct file *file_out, loff_t pos_out,
|
|
|
- u64 len)
|
|
|
-{
|
|
|
- int ret;
|
|
|
-
|
|
|
- file_start_write(file_out);
|
|
|
- ret = vfs_clone_file_range(file_in, pos_in, file_out, pos_out, len);
|
|
|
- file_end_write(file_out);
|
|
|
-
|
|
|
- return ret;
|
|
|
-}
|
|
|
-
|
|
|
/*
|
|
|
* get_write_access() gets write permission for a file.
|
|
|
* put_write_access() releases this write permission.
|