aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jffs2')
-rw-r--r--fs/jffs2/acl.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/fs/jffs2/acl.c b/fs/jffs2/acl.c
index 71d022d38508..5783ed81171b 100644
--- a/fs/jffs2/acl.c
+++ b/fs/jffs2/acl.c
@@ -277,7 +277,7 @@ int jffs2_check_acl(struct inode *inode, int mask)
277 277
278int jffs2_init_acl_pre(struct inode *dir_i, struct inode *inode, mode_t *i_mode) 278int jffs2_init_acl_pre(struct inode *dir_i, struct inode *inode, mode_t *i_mode)
279{ 279{
280 struct posix_acl *acl, *clone; 280 struct posix_acl *acl;
281 int rc; 281 int rc;
282 282
283 cache_no_acl(inode); 283 cache_no_acl(inode);
@@ -295,18 +295,13 @@ int jffs2_init_acl_pre(struct inode *dir_i, struct inode *inode, mode_t *i_mode)
295 if (S_ISDIR(*i_mode)) 295 if (S_ISDIR(*i_mode))
296 set_cached_acl(inode, ACL_TYPE_DEFAULT, acl); 296 set_cached_acl(inode, ACL_TYPE_DEFAULT, acl);
297 297
298 clone = posix_acl_clone(acl, GFP_KERNEL); 298 rc = posix_acl_create(&acl, GFP_KERNEL, i_mode);
299 if (!clone) 299 if (rc < 0)
300 return -ENOMEM;
301 rc = posix_acl_create_masq(clone, i_mode);
302 if (rc < 0) {
303 posix_acl_release(clone);
304 return rc; 300 return rc;
305 }
306 if (rc > 0) 301 if (rc > 0)
307 set_cached_acl(inode, ACL_TYPE_ACCESS, clone); 302 set_cached_acl(inode, ACL_TYPE_ACCESS, acl);
308 303
309 posix_acl_release(clone); 304 posix_acl_release(acl);
310 } 305 }
311 return 0; 306 return 0;
312} 307}