9p: lift the call of set_cached_acl() into the callers of v9fs_set_acl()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
38baba9ea0
commit
7f165aaa7d
@ -119,10 +119,6 @@ static int v9fs_set_acl(struct dentry *dentry, int type, struct posix_acl *acl)
|
|||||||
char *name;
|
char *name;
|
||||||
size_t size;
|
size_t size;
|
||||||
void *buffer;
|
void *buffer;
|
||||||
struct inode *inode = dentry->d_inode;
|
|
||||||
|
|
||||||
set_cached_acl(inode, type, acl);
|
|
||||||
|
|
||||||
if (!acl)
|
if (!acl)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -163,6 +159,7 @@ int v9fs_acl_chmod(struct dentry *dentry)
|
|||||||
retval = posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode);
|
retval = posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode);
|
||||||
if (retval)
|
if (retval)
|
||||||
return retval;
|
return retval;
|
||||||
|
set_cached_acl(inode, ACL_TYPE_ACCESS, acl);
|
||||||
retval = v9fs_set_acl(dentry, ACL_TYPE_ACCESS, acl);
|
retval = v9fs_set_acl(dentry, ACL_TYPE_ACCESS, acl);
|
||||||
posix_acl_release(acl);
|
posix_acl_release(acl);
|
||||||
}
|
}
|
||||||
@ -173,7 +170,9 @@ int v9fs_set_create_acl(struct dentry *dentry,
|
|||||||
struct posix_acl **dpacl, struct posix_acl **pacl)
|
struct posix_acl **dpacl, struct posix_acl **pacl)
|
||||||
{
|
{
|
||||||
if (dentry) {
|
if (dentry) {
|
||||||
|
set_cached_acl(dentry->d_inode, ACL_TYPE_DEFAULT, *dpacl);
|
||||||
v9fs_set_acl(dentry, ACL_TYPE_DEFAULT, *dpacl);
|
v9fs_set_acl(dentry, ACL_TYPE_DEFAULT, *dpacl);
|
||||||
|
set_cached_acl(dentry->d_inode, ACL_TYPE_ACCESS, *pacl);
|
||||||
v9fs_set_acl(dentry, ACL_TYPE_ACCESS, *pacl);
|
v9fs_set_acl(dentry, ACL_TYPE_ACCESS, *pacl);
|
||||||
}
|
}
|
||||||
posix_acl_release(*dpacl);
|
posix_acl_release(*dpacl);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user