diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2015-12-09 16:11:59 +0100 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2015-12-09 16:11:59 +0100 |
commit | ed06e069775ad9236087594a1c1667367e983fb5 (patch) | |
tree | b702188b844127526a42978198d599c700a2d791 /fs/overlayfs | |
parent | ovl: move super block magic number to magic.h (diff) | |
download | linux-ed06e069775ad9236087594a1c1667367e983fb5.tar.xz linux-ed06e069775ad9236087594a1c1667367e983fb5.zip |
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.c | 3 |
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; |