diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2016-09-01 11:12:00 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2016-09-01 11:12:00 +0200 |
commit | ce31513a9114f74fe3e9caa6534d201bdac7238d (patch) | |
tree | 22e6072f34525b1e0634a2e01f8f5fb9f2c86a1d /fs | |
parent | 0e585ccc13b3edbb187fb4f1b7cc9397f17d64a9 (diff) | |
download | linux-ce31513a9114f74fe3e9caa6534d201bdac7238d.tar.gz linux-ce31513a9114f74fe3e9caa6534d201bdac7238d.tar.bz2 linux-ce31513a9114f74fe3e9caa6534d201bdac7238d.zip |
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 <eguan@redhat.com>
Fixes: d837a49bd57f ("ovl: fix POSIX ACL setting")
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/overlayfs/super.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index 45a2eb0b4693..cba2c9fea98c 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); |