diff options
Diffstat (limited to 'fs/9p/acl.c')
-rw-r--r-- | fs/9p/acl.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/fs/9p/acl.c b/fs/9p/acl.c index 81ae143ff3f7..5b91689ac0b1 100644 --- a/fs/9p/acl.c +++ b/fs/9p/acl.c | |||
@@ -167,23 +167,25 @@ int v9fs_acl_chmod(struct inode *inode, struct p9_fid *fid) | |||
167 | } | 167 | } |
168 | 168 | ||
169 | int v9fs_set_create_acl(struct dentry *dentry, | 169 | int v9fs_set_create_acl(struct dentry *dentry, |
170 | struct posix_acl **dpacl, struct posix_acl **pacl) | 170 | struct posix_acl *dacl, struct posix_acl *acl) |
171 | { | 171 | { |
172 | if (dentry) { | 172 | struct p9_fid *fid = v9fs_fid_lookup(dentry); |
173 | struct p9_fid *fid = v9fs_fid_lookup(dentry); | 173 | set_cached_acl(dentry->d_inode, ACL_TYPE_DEFAULT, dacl); |
174 | set_cached_acl(dentry->d_inode, ACL_TYPE_DEFAULT, *dpacl); | 174 | set_cached_acl(dentry->d_inode, ACL_TYPE_ACCESS, acl); |
175 | set_cached_acl(dentry->d_inode, ACL_TYPE_ACCESS, *pacl); | 175 | if (!IS_ERR(fid)) { |
176 | if (!IS_ERR(fid)) { | 176 | v9fs_set_acl(fid, ACL_TYPE_DEFAULT, dacl); |
177 | v9fs_set_acl(fid, ACL_TYPE_DEFAULT, *dpacl); | 177 | v9fs_set_acl(fid, ACL_TYPE_ACCESS, acl); |
178 | v9fs_set_acl(fid, ACL_TYPE_ACCESS, *pacl); | ||
179 | } | ||
180 | } | 178 | } |
181 | posix_acl_release(*dpacl); | ||
182 | posix_acl_release(*pacl); | ||
183 | *dpacl = *pacl = NULL; | ||
184 | return 0; | 179 | return 0; |
185 | } | 180 | } |
186 | 181 | ||
182 | void v9fs_put_acl(struct posix_acl *dacl, | ||
183 | struct posix_acl *acl) | ||
184 | { | ||
185 | posix_acl_release(dacl); | ||
186 | posix_acl_release(acl); | ||
187 | } | ||
188 | |||
187 | int v9fs_acl_mode(struct inode *dir, umode_t *modep, | 189 | int v9fs_acl_mode(struct inode *dir, umode_t *modep, |
188 | struct posix_acl **dpacl, struct posix_acl **pacl) | 190 | struct posix_acl **dpacl, struct posix_acl **pacl) |
189 | { | 191 | { |