]> git.baikalelectronics.ru Git - kernel.git/commit
vfs: swap names of {do,vfs}_clone_file_range()
authorAmir Goldstein <amir73il@gmail.com>
Tue, 18 Sep 2018 13:34:34 +0000 (16:34 +0300)
committerMiklos Szeredi <mszeredi@redhat.com>
Mon, 24 Sep 2018 08:54:01 +0000 (10:54 +0200)
commitc0fcc6555bf2c4e620d528bd86c7f8df72fa693b
tree717a1d93d07997e95ca0d2cead500e5b01c8caea
parent10f710150c4afe085ba9dd62be4433f01715d558
vfs: swap names of {do,vfs}_clone_file_range()

Commit e79cc4a270ef ("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 68762a69b64e ("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>
fs/ioctl.c
fs/nfsd/vfs.c
fs/overlayfs/copy_up.c
fs/overlayfs/file.c
fs/read_write.c
include/linux/fs.h