Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp625343pxb; Wed, 22 Sep 2021 09:22:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGFMCB0ZLRdWyplxjL/aGuVohDASp9uXSdDaPHbagngFI5qs5wOyEIStYWzl2rXbnWd+Nk X-Received: by 2002:a05:6638:35a9:: with SMTP id v41mr597436jal.98.1632327754445; Wed, 22 Sep 2021 09:22:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632327754; cv=none; d=google.com; s=arc-20160816; b=gJMeHIAXdUb+eMLWV5Xq+cXi8ZSJEMhQF/+Za71N4+6zeLPCAvEEqEeQ5JiOIU4hPo EDuqXWl2+pO/9o9Rel73I67ocJiIJlngJs+YIEPi1aQ4R/KkxbN7YeQEKqFqicpWBwU4 W439VHSvP41KqHPhEiBZfhVqLt8ojLdWFVgm4N0Hs0myepGL/4eLtGVWNORvl1tixRlk 1bE3ZBXfLcdtWTWkAUL/rnR7qaNTD4aGwmyI0JO7or2X2t9ZjB4RR8NWpswJS62KarhA blDtpptOn9sHsjV5TDuVnkiJ25f1P9xMwtJfCgEbrC0OXb3YJwFB4rm7ZXc/Xdif61VF J/1Q== 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=e749/JBSqvPfXTMtu2F9EBHwqQD373LQ39GI5x0Pox4=; b=icRy8Nx9xYhaTwEmD9Vn+D7c/S+wqATOw7cpgus7ODIsKXTRdwLqraNgWfywYlR2VK 6G4vmff6a5zuTp+VxYShBOKUWtYjASIA3oU0QdeRv26uuU26/oAdy2bSjw/8FOUTcnEa vsJf3Wjx6CuStPXYcOmiZMg05fL9OWkI2QYD5s6pO1mx3hsFndHK+gSLk95nvdz8vKRS I/6RwxRkcsQqCbJ6bZni/dq6uB3MZR9+DEcN1c1+BTKrm/Svrsj+3CmYUNE6LDauEe13 m5k9+kCOm7hLNVfel/7oj4FCSqFIiSNvhqlf/RFpO9LuEgxJwpftYb7VcgyrXFct5Mqs L/Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paragon-software.com header.s=mail header.b=mcq2IUhH; 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 v3si2908957jao.112.2021.09.22.09.22.10; Wed, 22 Sep 2021 09:22:34 -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=mcq2IUhH; 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 S236634AbhIVQVj (ORCPT + 99 others); Wed, 22 Sep 2021 12:21:39 -0400 Received: from relayfre-01.paragon-software.com ([176.12.100.13]:44224 "EHLO relayfre-01.paragon-software.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236565AbhIVQVi (ORCPT ); Wed, 22 Sep 2021 12:21:38 -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 2E1601D1D; Wed, 22 Sep 2021 19:20:07 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paragon-software.com; s=mail; t=1632327607; bh=e749/JBSqvPfXTMtu2F9EBHwqQD373LQ39GI5x0Pox4=; h=Date:Subject:From:To:References:CC:In-Reply-To; b=mcq2IUhHofJ7p/Mr4tmzgGVTTxJn7W99nN4rhDY3Uqek73I5/V2LhMf4Cp8nyWNAH HC2Zd9FGqcGAiKdA+lsQz9TDDUH7oCzMCW9Gq5XbAzTYM6s1bxK+6eD0fWF6rEaSFE Hi0/AI8TUvk7WrdEB2RsrKxb+xPqk1o7Cvnlc5C0= Received: from [192.168.211.195] (192.168.211.195) 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; Wed, 22 Sep 2021 19:20:06 +0300 Message-ID: <18250134-b9a0-c2af-ce7f-9ec01ddfdb9a@paragon-software.com> Date: Wed, 22 Sep 2021 19:20:05 +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 4/5] fs/ntfs3: Change posix_acl_equiv_mode to posix_acl_update_mode Content-Language: en-US From: Konstantin Komarov To: References: <2771ff62-e612-a8ed-4b93-5534c26aef9e@paragon-software.com> CC: , In-Reply-To: <2771ff62-e612-a8ed-4b93-5534c26aef9e@paragon-software.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.211.195] X-ClientProxiedBy: vobn-exch-01.paragon-software.com (172.30.72.13) 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. 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