[PATCH 10/11] vfs: allow generic_copy_file_range to copy across devices

Dave Chinner
2018-12-03T08:34:34Z

From: Dave Chinner <dchinner@redhat.com>

do_splice_direct() can copy across superblocks without problems.
Remove the same superblock restriction on this fallback code.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
fs/read_write.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/fs/read_write.c b/fs/read_write.c
index 4e0666de0d69..b0f231b10836 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -1565,10 +1565,6 @@ ssize_t generic_copy_file_range(struct file *file_in, loff_t pos_in,
struct file *file_out, loff_t pos_out,
size_t len, unsigned int flags)
{
- /* Temporary, do_splice_direct supports cross-sb copies */
- if (file_inode(file_in)->i_sb != file_inode(file_out)->i_sb)
- return -EXDEV;
-
return do_splice_direct(file_in, &pos_in, file_out, &pos_out,
len > MAX_RW_COUNT ? MAX_RW_COUNT : len, 0);
}
--
2.19.1