import PULS_20180308
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / fs / generic_acl.c
index b3f3676796d31a6870a771ed6952977cfc16d448..21408084c3b34c9fb51d706fc69480a9fd2915a2 100644 (file)
@@ -87,14 +87,10 @@ generic_acl_set(struct dentry *dentry, const char *name, const void *value,
                        goto failed;
                switch (type) {
                case ACL_TYPE_ACCESS:
-                       error = posix_acl_equiv_mode(acl, &inode->i_mode);
-                       if (error < 0)
+                       error = posix_acl_update_mode(inode, &inode->i_mode, &acl);
+                       if (error)
                                goto failed;
                        inode->i_ctime = CURRENT_TIME;
-                       if (error == 0) {
-                               posix_acl_release(acl);
-                               acl = NULL;
-                       }
                        break;
                case ACL_TYPE_DEFAULT:
                        if (!S_ISDIR(inode->i_mode)) {