Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp699643pxb; Thu, 23 Sep 2021 08:53:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz88kD2TvXFF9hHV4aCQui3WnnIH4rQDBuOROIFdxsjQk6F5JK2i7kGZX2ufWwuUB7BFf0f X-Received: by 2002:a17:906:704e:: with SMTP id r14mr5669674ejj.293.1632412418305; Thu, 23 Sep 2021 08:53:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632412418; cv=none; d=google.com; s=arc-20160816; b=lxmraKMZmmMY3DQKVdZwBponZxSpINmyw3tBMHfNYN6SCHyrAP9kLgiz78OR2cDhpU SyF2juJseyTaE/05Cv1usCpyuBiSI92mqE8jfvYyJmqyJvWaaIf3iuKgkGhF6ngWe2CC inw7BCsRbghnretbstEVaqijEJX0J+l8db5+EimezTHcIktT4VVcSYmvOxU8roi2WqPX j+mHQKzFUUy/wFjFB9LfyF9sRhsL+/PFvmf1JdBezZ/SqE/riUOC3gKmnjHVOMJaU1He vN59aXqIIAIqfCuXCezPL/Yhftq5O7DHGugIq6pVPkZcvCivUbfAYm3nNXbRSNnlEA7T z8ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:cc :references:to:from:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=SuD8zN6xNAKrdgxn219w20we7FQ4HvQ5FkLa7M0DkHU=; b=NDYQP7OSKntMGLj4Fr3PyGmYf3HNFR4MrLS065Hx7j1oDZjtWKwBPIYfh/1TSkanOH 6m3a4rENy1hecCKPOPt++0m2r5PA+07AKxvpiMPWH3EZFMe90Yvko7XE5W9RHWDYiAda 8joxNZVITsFDWGvCxTKyeB5Cof8jfSiFmOr93cAdjmcs/fiiwze/fL72kGD7TfJXR1T3 AmSHY7wm3prw423vrLq9rtku3cmCvZKFkJvU5+VGVhbgGHBWolHLG2rF2YN0znnTcDmm ngNhddETklRZAVn+cfowwNfKNyoQ5lgY+TbF46FnI+7xSnpFiZzXruMG5hg9xT8eSnRO kW9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paragon-software.com header.s=mail header.b=G+mHblGn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=paragon-software.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u13si6128548eju.764.2021.09.23.08.53.12; Thu, 23 Sep 2021 08:53:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@paragon-software.com header.s=mail header.b=G+mHblGn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=paragon-software.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242246AbhIWPvD (ORCPT + 99 others); Thu, 23 Sep 2021 11:51:03 -0400 Received: from relayfre-01.paragon-software.com ([176.12.100.13]:35722 "EHLO relayfre-01.paragon-software.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242143AbhIWPsO (ORCPT ); Thu, 23 Sep 2021 11:48:14 -0400 Received: from dlg2.mail.paragon-software.com (vdlg-exch-02.paragon-software.com [172.30.1.105]) by relayfre-01.paragon-software.com (Postfix) with ESMTPS id 803F11D99; Thu, 23 Sep 2021 18:44:56 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paragon-software.com; s=mail; t=1632411896; bh=SuD8zN6xNAKrdgxn219w20we7FQ4HvQ5FkLa7M0DkHU=; h=Date:Subject:From:To:References:CC:In-Reply-To; b=G+mHblGnK8rNSp7ONON6k/QvKelb3TjsmJnOmb18XWa1n6tuqMqynrc4i0D5KovGE zet35q7FlpGnH0JfaQLHem3oDnv+7jQF7u5i2Y4vfbxGQyJKHVE3c2hoSh80uDxNbH P3Dtt9xZOXxyZ63uje/ZdIPZJhZP50h45MQ5Go2I= Received: from [192.168.211.73] (192.168.211.73) by vdlg-exch-02.paragon-software.com (172.30.1.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 23 Sep 2021 18:44:56 +0300 Message-ID: <22b8b701-e0c0-9b3f-dd58-0e8ab7c54754@paragon-software.com> Date: Thu, 23 Sep 2021 18:44:55 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.1 Subject: [PATCH v2 5/6] fs/ntfs3: Change posix_acl_equiv_mode to posix_acl_update_mode Content-Language: en-US From: Konstantin Komarov To: References: CC: , In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.211.73] X-ClientProxiedBy: vdlg-exch-02.paragon-software.com (172.30.1.105) To vdlg-exch-02.paragon-software.com (172.30.1.105) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Right now ntfs3 uses posix_acl_equiv_mode instead of posix_acl_update_mode like all other fs. Reviewed-by: Kari Argillander Signed-off-by: Konstantin Komarov --- fs/ntfs3/xattr.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/fs/ntfs3/xattr.c b/fs/ntfs3/xattr.c index 70f2f9eb6b1e..59ec5e61a239 100644 --- a/fs/ntfs3/xattr.c +++ b/fs/ntfs3/xattr.c @@ -559,22 +559,15 @@ static noinline int ntfs_set_acl_ex(struct user_namespace *mnt_userns, if (acl) { umode_t mode = inode->i_mode; - err = posix_acl_equiv_mode(acl, &mode); - if (err < 0) - return err; + err = posix_acl_update_mode(mnt_userns, inode, &mode, + &acl); + if (err) + goto out; if (inode->i_mode != mode) { inode->i_mode = mode; mark_inode_dirty(inode); } - - if (!err) { - /* - * ACL can be exactly represented in the - * traditional file mode permission bits. - */ - acl = NULL; - } } name = XATTR_NAME_POSIX_ACL_ACCESS; name_len = sizeof(XATTR_NAME_POSIX_ACL_ACCESS) - 1; -- 2.33.0