From: Miklos Szeredi Date: Thu, 1 Sep 2016 09:12:00 +0000 (+0200) Subject: ovl: copyattr after setting POSIX ACL X-Git-Tag: v4.14-rc1~2517^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ce31513a9114f74fe3e9caa6534d201bdac7238d;p=platform%2Fkernel%2Flinux-rpi.git ovl: copyattr after setting POSIX ACL Setting POSIX acl may also modify the file mode, so need to copy that up to the overlay inode. Reported-by: Eryu Guan Fixes: d837a49bd57f ("ovl: fix POSIX ACL setting") Signed-off-by: Miklos Szeredi --- diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index 45a2eb0..cba2c9f 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -1018,7 +1018,11 @@ ovl_posix_acl_xattr_set(const struct xattr_handler *handler, posix_acl_release(acl); - return ovl_xattr_set(dentry, handler->name, value, size, flags); + err = ovl_xattr_set(dentry, handler->name, value, size, flags); + if (!err) + ovl_copyattr(ovl_inode_real(inode, NULL), inode); + + return err; out_acl_release: posix_acl_release(acl);