diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2015-12-09 16:11:59 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-25 12:01:24 -0800 |
commit | 7193e802960f884e0ae6c40711c4e3c70fa3b070 (patch) | |
tree | 32bfbee98b4b2187f7100b076ab465183f95e8ba | |
parent | 367e439dbc238907963ddf2758200b55087cab04 (diff) | |
download | lwn-7193e802960f884e0ae6c40711c4e3c70fa3b070.tar.gz lwn-7193e802960f884e0ae6c40711c4e3c70fa3b070.zip |
ovl: root: copy attr
commit ed06e069775ad9236087594a1c1667367e983fb5 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 e38ee0fed24a..ff826652feae 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -1053,6 +1053,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; |