diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-01-31 12:46:55 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-26 02:46:05 -0500 |
commit | 7f165aaa7dc898472f3b3fbf2231bb3b5623a3df (patch) | |
tree | 6c6aa203a183b2da428ccba243fdea0fd4eeb7c0 /fs/9p | |
parent | 38baba9ea02780c2df35c7a02552fddeb8576e16 (diff) | |
download | linux-7f165aaa7dc898472f3b3fbf2231bb3b5623a3df.tar.gz linux-7f165aaa7dc898472f3b3fbf2231bb3b5623a3df.tar.bz2 linux-7f165aaa7dc898472f3b3fbf2231bb3b5623a3df.zip |
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>
Diffstat (limited to 'fs/9p')
-rw-r--r-- | fs/9p/acl.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/9p/acl.c b/fs/9p/acl.c index 15b679166201..c5d8cd638e6e 100644 --- a/fs/9p/acl.c +++ b/fs/9p/acl.c @@ -119,10 +119,6 @@ static int v9fs_set_acl(struct dentry *dentry, int type, struct posix_acl *acl) char *name; size_t size; void *buffer; - struct inode *inode = dentry->d_inode; - - set_cached_acl(inode, type, acl); - if (!acl) return 0; @@ -163,6 +159,7 @@ int v9fs_acl_chmod(struct dentry *dentry) retval = posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode); if (retval) return retval; + set_cached_acl(inode, ACL_TYPE_ACCESS, acl); retval = v9fs_set_acl(dentry, ACL_TYPE_ACCESS, 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) { if (dentry) { + set_cached_acl(dentry->d_inode, 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); } posix_acl_release(*dpacl); |