diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2015-12-09 16:11:59 +0100 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2016-02-01 11:37:12 -0500 |
commit | ba122961c9ef892d5b94d68fbb91d59e3d6ec38a (patch) | |
tree | 7aa112b751fc3b39b0dbee8e188edaf96defc999 /fs/overlayfs | |
parent | a94ff8213e3bd0918424f3208450955638f98197 (diff) |
ovl: root: copy attr
[ Upstream commit ed06e069775ad9236087594a1c1667367e983fb5 ]
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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
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 d74af7f78fec..c4b595e2fc20 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -986,6 +986,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; |