diff options
author | Amir Goldstein <amir73il@gmail.com> | 2018-09-18 16:34:34 +0300 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2018-09-24 10:54:01 +0200 |
commit | a725356b6659469d182d662f22d770d83d3bc7b5 (patch) | |
tree | 717a1d93d07997e95ca0d2cead500e5b01c8caea /fs/ioctl.c | |
parent | d9d150ae50675e3c1d68047aafb2e981be685d90 (diff) | |
download | linux-rpi-a725356b6659469d182d662f22d770d83d3bc7b5.tar.gz linux-rpi-a725356b6659469d182d662f22d770d83d3bc7b5.tar.bz2 linux-rpi-a725356b6659469d182d662f22d770d83d3bc7b5.zip |
vfs: swap names of {do,vfs}_clone_file_range()
Commit 031a072a0b8a ("vfs: call vfs_clone_file_range() under freeze
protection") created a wrapper do_clone_file_range() around
vfs_clone_file_range() moving the freeze protection to former, so
overlayfs could call the latter.
The more common vfs practice is to call do_xxx helpers from vfs_xxx
helpers, where freeze protecction is taken in the vfs_xxx helper, so
this anomality could be a source of confusion.
It seems that commit 8ede205541ff ("ovl: add reflink/copyfile/dedup
support") may have fallen a victim to this confusion -
ovl_clone_file_range() calls the vfs_clone_file_range() helper in the
hope of getting freeze protection on upper fs, but in fact results in
overlayfs allowing to bypass upper fs freeze protection.
Swap the names of the two helpers to conform to common vfs practice
and call the correct helpers from overlayfs and nfsd.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/ioctl.c')
-rw-r--r-- | fs/ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ioctl.c b/fs/ioctl.c index 3212c29235ce..2005529af560 100644 --- a/fs/ioctl.c +++ b/fs/ioctl.c @@ -230,7 +230,7 @@ static long ioctl_file_clone(struct file *dst_file, unsigned long srcfd, ret = -EXDEV; if (src_file.file->f_path.mnt != dst_file->f_path.mnt) goto fdput; - ret = do_clone_file_range(src_file.file, off, dst_file, destoff, olen); + ret = vfs_clone_file_range(src_file.file, off, dst_file, destoff, olen); fdput: fdput(src_file); return ret; |