Skip to content

Commit

Permalink
ovl: copyattr after setting POSIX ACL
Browse files Browse the repository at this point in the history
Setting POSIX acl may also modify the file mode, so need to copy that up to
the overlay inode.

Reported-by: Eryu Guan <[email protected]>
Fixes: d837a49 ("ovl: fix POSIX ACL setting")
Signed-off-by: Miklos Szeredi <[email protected]>
  • Loading branch information
Miklos Szeredi committed Sep 1, 2016
1 parent 0e585cc commit ce31513
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fs/overlayfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ce31513

Please sign in to comment.