linux-stable/fs/overlayfs
Amir Goldstein 8a6cee344c vfs: swap names of {do,vfs}_clone_file_range()
commit a725356b66 upstream.

Commit 031a072a0b ("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 8ede205541 ("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>
Fixes: 031a072a0b ("vfs: call vfs_clone_file_range() under freeze...")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2018-11-10 07:48:33 -08:00
..
copy_up.c vfs: swap names of {do,vfs}_clone_file_range() 2018-11-10 07:48:33 -08:00
dir.c ovl: fix missing unlock_rename() in ovl_do_copy_up() 2017-10-05 15:53:18 +02:00
inode.c ovl: hash non-dir by lower inode for fsnotify 2018-10-03 17:00:56 -07:00
Kconfig ovl: introduce the inodes index dir feature 2017-07-04 22:03:17 +02:00
Makefile ovl: split super.c 2016-12-16 11:02:56 +01:00
namei.c ovl: fix access beyond unterminated strings 2018-10-10 08:54:26 +02:00
overlayfs.h ovl: fix format of setxattr debug 2018-10-10 08:54:27 +02:00
ovl_entry.h locking/barriers: Convert users of lockless_dereference() to READ_ONCE() 2017-12-25 14:26:21 +01:00
readdir.c ovl: fix wrong use of impure dir cache in ovl_iterate() 2018-09-09 19:55:58 +02:00
super.c ovl: Sync upper dirty data when syncing overlayfs 2018-08-03 07:50:43 +02:00
util.c ovl: fix memory leak on unlink of indexed file 2018-10-10 08:54:27 +02:00