aboutsummaryrefslogtreecommitdiff
path: root/fs/jffs2/acl.c
diff options
context:
space:
mode:
authorRygebin <kaankulahli@gmail.com>2017-06-20 14:29:27 +0000
committerRygebin <kaankulahli@gmail.com>2017-06-20 14:29:27 +0000
commitafa9ad70f02491fbe10df2203f8f2fa42f956228 (patch)
treeb6dce4ed04f62fd443721a94ac3e7f81427e0ad1 /fs/jffs2/acl.c
parent582eb92a1e8bf6c0e743774c1fb550e630715433 (diff)
parent08d1ec9238c605a9a5cf1229fd60961efcd21ff1 (diff)
Merge https://github.com/OneDeveloperOrganization/android_kernel_google_shamrock into n7.1HEADn7.1
Diffstat (limited to 'fs/jffs2/acl.c')
-rw-r--r--fs/jffs2/acl.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/jffs2/acl.c b/fs/jffs2/acl.c
index 223283c3011..9335b8d3cf5 100644
--- a/fs/jffs2/acl.c
+++ b/fs/jffs2/acl.c
@@ -243,9 +243,10 @@ static int jffs2_set_acl(struct inode *inode, int type, struct posix_acl *acl)
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;
@@ -257,8 +258,6 @@ static int jffs2_set_acl(struct inode *inode, int type, struct posix_acl *acl)
if (rc < 0)
return rc;
}
- if (rc == 0)
- acl = NULL;
}
break;
case ACL_TYPE_DEFAULT: