tmp_suning_uos_patched/fs/overlayfs
Vivek Goyal 935a074f48 ovl: Do not do metacopy only for ioctl modifying file attr
ovl_copy_up() by default will only do metadata only copy up (if enabled).
That means when ovl_real_ioctl() calls ovl_real_file(), it will still get
the lower file (as ovl_real_file() opens data file and not metacopy).  And
that means "chattr +i" will end up modifying lower inode.

There seem to be two ways to solve this.
A. Open metacopy file in ovl_real_ioctl() and do operations on that
B. Force full copy up when FS_IOC_SETFLAGS is called.

I am resorting to option B for now as it feels little safer option.  If
there are performance issues due to this, we can revisit it.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2018-07-20 09:56:17 +02:00
..
copy_up.c ovl: add helper to force data copy-up 2018-07-20 09:56:16 +02:00
dir.c ovl: Set redirect on upper inode when it is linked 2018-07-20 09:56:15 +02:00
export.c ovl: Modify ovl_lookup() and friends to lookup metacopy dentry 2018-07-20 09:56:09 +02:00
file.c ovl: Do not do metacopy only for ioctl modifying file attr 2018-07-20 09:56:17 +02:00
inode.c ovl: Do not do metadata only copy-up for truncate operation 2018-07-20 09:56:17 +02:00
Kconfig ovl: Provide a mount option metacopy=on/off for metadata copyup 2018-07-20 09:56:06 +02:00
Makefile ovl: stack file ops 2018-07-18 15:44:41 +02:00
namei.c ovl: Check redirect on index as well 2018-07-20 09:56:16 +02:00
overlayfs.h ovl: add helper to force data copy-up 2018-07-20 09:56:16 +02:00
ovl_entry.h ovl: Store lower data inode in ovl_inode 2018-07-20 09:56:11 +02:00
readdir.c ovl: fix wrong use of impure dir cache in ovl_iterate() 2018-07-17 16:04:34 +02:00
super.c ovl: Do not expose metacopy only dentry from d_real() 2018-07-20 09:56:12 +02:00
util.c ovl: Check redirect on index as well 2018-07-20 09:56:16 +02:00