summaryrefslogtreecommitdiffstats
path: root/fs/overlayfs
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2015-12-09 16:11:59 +0100
committerMiklos Szeredi <miklos@szeredi.hu>2015-12-09 16:11:59 +0100
commited06e069775ad9236087594a1c1667367e983fb5 (patch)
treeb702188b844127526a42978198d599c700a2d791 /fs/overlayfs
parent257f871993474e2bde6c497b54022c362cf398e1 (diff)
downloadlinux-ed06e069775ad9236087594a1c1667367e983fb5.tar.bz2
ovl: root: copy attr
We copy i_uid and i_gid of underlying inode into overlayfs inode. Except for the root inode. Fix this omission. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Cc: <stable@vger.kernel.org>
Diffstat (limited to 'fs/overlayfs')
-rw-r--r--fs/overlayfs/super.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
index 32f31243d36a..ec31711d4886 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -1079,6 +1079,9 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
root_dentry->d_fsdata = oe;
+ ovl_copyattr(ovl_dentry_real(root_dentry)->d_inode,
+ root_dentry->d_inode);
+
sb->s_magic = OVERLAYFS_SUPER_MAGIC;
sb->s_op = &ovl_super_operations;
sb->s_root = root_dentry;