summaryrefslogtreecommitdiffstats
path: root/fs/overlayfs
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2018-05-11 11:49:33 -0400
committerMiklos Szeredi <mszeredi@redhat.com>2018-07-20 09:56:17 +0200
commit935a074f48675374a655456ae75fe6be9e8c2388 (patch)
treee12f2216c7a5e8f27835bcbaa8e3f4ed4e231c14 /fs/overlayfs
parent997336f2c3053b74ec8c9d2d368ddd960f2fc8b6 (diff)
downloadblackbird-op-linux-935a074f48675374a655456ae75fe6be9e8c2388.tar.gz
blackbird-op-linux-935a074f48675374a655456ae75fe6be9e8c2388.zip
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>
Diffstat (limited to 'fs/overlayfs')
-rw-r--r--fs/overlayfs/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c
index 5ab281aa64b5..32e9282893c9 100644
--- a/fs/overlayfs/file.c
+++ b/fs/overlayfs/file.c
@@ -372,7 +372,7 @@ static long ovl_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
if (ret)
return ret;
- ret = ovl_copy_up(file_dentry(file));
+ ret = ovl_copy_up_with_data(file_dentry(file));
if (!ret) {
ret = ovl_real_ioctl(file, cmd, arg);
OpenPOWER on IntegriCloud