posix_acl: Clear SGID bit when setting file permissions
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / fs / jfs / xattr.c
index 42d67f9757bf641d316b07e78a3fb1a698f76409..29a28601cb93eb0d8c39098d95f0e92ab16ed562 100644 (file)
@@ -693,8 +693,9 @@ static int can_set_system_xattr(struct inode *inode, const char *name,
                        return rc;
                }
                if (acl) {
-                       rc = posix_acl_equiv_mode(acl, &inode->i_mode);
-                       posix_acl_release(acl);
+                       struct posix_acl *old_acl = acl;
+                       rc = posix_acl_update_mode(inode, &inode->i_mode, &acl);
+                       posix_acl_release(old_acl);
                        if (rc < 0) {
                                printk(KERN_ERR
                                       "posix_acl_equiv_mode returned %d\n",