fs: make posix_acl_create more useful
Rename the current posix_acl_created to __posix_acl_create and add a fully featured helper to set up the ACLs on file creation that uses get_acl(). Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:

committed by
Al Viro

parent
5bf3258fd2
commit
37bc15392a
@@ -297,12 +297,12 @@ xfs_inherit_acl(struct inode *inode, struct posix_acl *acl)
|
||||
goto out;
|
||||
}
|
||||
|
||||
error = posix_acl_create(&acl, GFP_KERNEL, &mode);
|
||||
error = __posix_acl_create(&acl, GFP_KERNEL, &mode);
|
||||
if (error < 0)
|
||||
return error;
|
||||
|
||||
/*
|
||||
* If posix_acl_create returns a positive value we need to
|
||||
* If __posix_acl_create returns a positive value we need to
|
||||
* inherit a permission that can't be represented using the Unix
|
||||
* mode bits and we actually need to set an ACL.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user