Skip to content

Commit ba12296

Browse files
szmisashalevin
authored andcommitted
ovl: root: copy attr
[ Upstream commit ed06e06 ] 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 <[email protected]> Cc: <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent a94ff82 commit ba12296

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/overlayfs/super.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -986,6 +986,9 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
986986

987987
root_dentry->d_fsdata = oe;
988988

989+
ovl_copyattr(ovl_dentry_real(root_dentry)->d_inode,
990+
root_dentry->d_inode);
991+
989992
sb->s_magic = OVERLAYFS_SUPER_MAGIC;
990993
sb->s_op = &ovl_super_operations;
991994
sb->s_root = root_dentry;

0 commit comments

Comments
 (0)