summaryrefslogtreecommitdiffstats
path: root/kernel/fs/jffs2/acl.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fs/jffs2/acl.c')
-rw-r--r--kernel/fs/jffs2/acl.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/kernel/fs/jffs2/acl.c b/kernel/fs/jffs2/acl.c
index 2f7a3c090..f9f86f87d 100644
--- a/kernel/fs/jffs2/acl.c
+++ b/kernel/fs/jffs2/acl.c
@@ -235,9 +235,10 @@ int jffs2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
case ACL_TYPE_ACCESS:
xprefix = JFFS2_XPREFIX_ACL_ACCESS;
if (acl) {
- umode_t mode = inode->i_mode;
- rc = posix_acl_equiv_mode(acl, &mode);
- if (rc < 0)
+ umode_t mode;
+
+ rc = posix_acl_update_mode(inode, &mode, &acl);
+ if (rc)
return rc;
if (inode->i_mode != mode) {
struct iattr attr;
@@ -249,8 +250,6 @@ int jffs2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
if (rc < 0)
return rc;
}
- if (rc == 0)
- acl = NULL;
}
break;
case ACL_TYPE_DEFAULT: