import PULS_20180308
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / fs / gfs2 / acl.c
index f69ac0af5496cd456bf6df4d0c932747b6767779..a4813c36842c81b166dc2e6bcea683b41ecf7605 100644 (file)
@@ -268,15 +268,11 @@ static int gfs2_xattr_system_set(struct dentry *dentry, const char *name,
 
        if (type == ACL_TYPE_ACCESS) {
                umode_t mode = inode->i_mode;
-               error = posix_acl_equiv_mode(acl, &mode);
 
-               if (error <= 0) {
-                       posix_acl_release(acl);
-                       acl = NULL;
+               error = posix_acl_update_mode(inode, &inode->i_mode, &acl);
 
-                       if (error < 0)
-                               return error;
-               }
+               if (error)
+                       goto out_release;
 
                error = gfs2_set_mode(inode, mode);
                if (error)