Thread (269 messages) 269 messages, 1 author, 2016-01-27
STALE3825d

[PATCH 4.2.y-ckt 018/268] ovl: root: copy attr

From: Kamal Mostafa <hidden>
Date: 2016-01-27 21:59:50
Also in: lkml
Subsystem: filesystems (vfs and infrastructure), overlay filesystem, the rest · Maintainers: Alexander Viro, Christian Brauner, Miklos Szeredi, Amir Goldstein, Linus Torvalds

4.2.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

---8<------------------------------------------------------------

From: Miklos Szeredi <miklos@szeredi.hu>

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: Kamal Mostafa <redacted>
---
 fs/overlayfs/super.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
index e38ee0f..ff82665 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;
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help