]> git.baikalelectronics.ru Git - kernel.git/commit
vfs: allow some remap flags to be passed to vfs_clone_file_range
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 30 Nov 2018 20:32:38 +0000 (12:32 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 4 Dec 2018 16:50:49 +0000 (08:50 -0800)
commitdc14c5536a429e8a83a05af7c057d1c1a4e56483
tree0ac2f8aa8dbdb860b34faa7274e723004fff2b00
parent417c4a12a5b2a37767a8813c80b02982c1124f8e
vfs: allow some remap flags to be passed to vfs_clone_file_range

In overlayfs, ovl_remap_file_range calls vfs_clone_file_range on the
lower filesystem's inode, passing through whatever remap flags it got
from its caller.  Since vfs_copy_file_range first tries a filesystem's
remap function with REMAP_FILE_CAN_SHORTEN, this can get passed through
to the second vfs_copy_file_range call, and this isn't an issue.
Change the WARN_ON to look only for the DEDUP flag.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/read_write.c