]> git.ipfire.org Git - people/arne_f/kernel.git/commit - fs/read_write.c
vfs: allow vfs_clone_file_range() across mount points
authorAmir Goldstein <amir73il@gmail.com>
Fri, 23 Sep 2016 08:38:10 +0000 (11:38 +0300)
committerMiklos Szeredi <mszeredi@redhat.com>
Fri, 16 Dec 2016 10:02:54 +0000 (11:02 +0100)
commit913b86e92e1f68ab9db00ccb0fecf594732511e5
tree5336fd4aef2feec90dc4c5fa25567813b6154332
parent3616119da484699e7045957c009c13d778563874
vfs: allow vfs_clone_file_range() across mount points

FICLONE/FICLONERANGE ioctls return -EXDEV if src and dest
files are not on the same mount point.
Practically, clone only requires that src and dest files
are on the same file system.

Move the check for same mount point to ioctl handler and keep
only the check for same super block in the vfs helper.

A following patch is going to use the vfs_clone_file_range()
helper in overlayfs to copy up between lower and upper
mount points on the same file system.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/ioctl.c
fs/read_write.c