From patchwork Fri Oct 28 17:06:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konstantin Komarov X-Patchwork-Id: 12493 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp944985wru; Fri, 28 Oct 2022 10:10:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7KYNgVCtBHDxWso5pFXVC/mMzq1OrMTFaODTsvx53Iou9S2r3YIBom13WIoT5wgO3zLYY6 X-Received: by 2002:a17:906:9be6:b0:7ad:a73b:40c7 with SMTP id de38-20020a1709069be600b007ada73b40c7mr301566ejc.483.1666977028323; Fri, 28 Oct 2022 10:10:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666977028; cv=none; d=google.com; s=arc-20160816; b=ZtJQdEnR9owcTgCv9lGOC7pN0Pw6yNo20+/6kVFIKNZI+HZE1D2g+qSmMWYg6PuPRX lae2C+pQtEECdUOS9xOG901Tc0EGhF03LETkcJK3Z5hhWTGhxRgB2nschPe2HyTt4PhY mQReySZa0P4DepjkuPpp0TsdyanSa/BM72WmGQ3MEL5Tp1koanGIkoe9ge2ZoxK3qket Ly5BhCJlKSxF7PjY/fA+lOFcXIcyPP1HMKjn6j3Q90PoKkKzOi2yZp9m/k+Im56dcF/9 tt+7hcYmaeyxdM+SJfowu8r9HrS+uF4Vy+FwSXmekRfvzlIlWKtqhAb0UEQ7lQaXW7U/ E0Qw== 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:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature:dkim-signature; bh=j4ORUvqVhkK0F9A+1IIYdz9n48bqtuNM+OM62p7TIGk=; b=RnDEnOrmWgGKJIxl7muy1fQ/R9zNY+XYusk5djhKMGDR6F2WqmbmIgvHex2NYj+oGZ 7ZsHb0kgwSjkJwBY7jALrk//msDetbiBAyP2k6Zp602En7Ec+9LLW+YHLXhh1RLbnJc8 dppjoneqPIUvUnpU+MWLrQ5/pXDoM+fN2oLN0/XsABNfcKGyF6lVAtXSe+ompHNl1hNO akzUZeMd0f9v+pvW9+QTjX+/o/SofU5kgb0eugwIHJzHgr6mT6/KQexUX2Wdso58GSnH KAfNrLwj9f25MdOmD5y76QWY66m9PmJYm9rhreflUvPH22biwLt7xDGiUip79K3s1hU3 X36g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paragon-software.com header.s=mail header.b=FHK05avF; dkim=pass header.i=@paragon-software.com header.s=mail header.b=VKPh8fFO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z36-20020a509e27000000b0045c0accb2b8si3544890ede.205.2022.10.28.10.10.04; Fri, 28 Oct 2022 10:10:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@paragon-software.com header.s=mail header.b=FHK05avF; dkim=pass header.i=@paragon-software.com header.s=mail header.b=VKPh8fFO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230315AbiJ1RJI (ORCPT + 99 others); Fri, 28 Oct 2022 13:09:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230224AbiJ1RIw (ORCPT ); Fri, 28 Oct 2022 13:08:52 -0400 Received: from relayaws-01.paragon-software.com (relayaws-01.paragon-software.com [35.157.23.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8243A237969; Fri, 28 Oct 2022 10:06:28 -0700 (PDT) Received: from relayfre-01.paragon-software.com (unknown [172.30.72.12]) by relayaws-01.paragon-software.com (Postfix) with ESMTPS id 8EE1B2190; Fri, 28 Oct 2022 17:03:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paragon-software.com; s=mail; t=1666976621; bh=j4ORUvqVhkK0F9A+1IIYdz9n48bqtuNM+OM62p7TIGk=; h=Date:Subject:From:To:CC:References:In-Reply-To; b=FHK05avF9oE6RAvXO72+smY9XzEcWpcd80DLIpUH4SCCjl7G27Y0tZBQqFrtZkUmC RhuYbADIpVVOD8nzqYHqHx0Rvo4TFH3lgBTZu5wnL/cVOSDBhm7ya6qud8Xjf14NBF l7oJOIH2e8iz+EPBGa5axGM1GAPkuk2x578Q1cpI= 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 8C4DEDD; Fri, 28 Oct 2022 17:06:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paragon-software.com; s=mail; t=1666976780; bh=j4ORUvqVhkK0F9A+1IIYdz9n48bqtuNM+OM62p7TIGk=; h=Date:Subject:From:To:CC:References:In-Reply-To; b=VKPh8fFOP+7Fw3rPiiEKH9CCeDSs5ZvaGd1IiP8dtrS3+NZHgD3SeaduCWNeyrUWc cnMoDaHYeclz5Pr1PfDD2dQVKRZopW9/AujhVUa5PCSHs9AbAUnr/vxIUAe28TwW4r FzQBMAFo7+z/SHdkd4InHtmDmLbDuzxyVjxTdF1g= Received: from [172.30.8.65] (172.30.8.65) 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.2375.7; Fri, 28 Oct 2022 20:06:20 +0300 Message-ID: <2753fbab-c602-9bad-1f93-65c050461703@paragon-software.com> Date: Fri, 28 Oct 2022 20:06:20 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: [PATCH 10/14] fs/ntfs3: Fix incorrect if in ntfs_set_acl_ex Content-Language: en-US From: Konstantin Komarov To: CC: , References: In-Reply-To: X-Originating-IP: [172.30.8.65] X-ClientProxiedBy: vdlg-exch-02.paragon-software.com (172.30.1.105) To vdlg-exch-02.paragon-software.com (172.30.1.105) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747952104229847453?= X-GMAIL-MSGID: =?utf-8?q?1747952104229847453?= We need to update ctime too with mode. Fixes xfstest generic/307 Signed-off-by: Konstantin Komarov --- fs/ntfs3/xattr.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/ntfs3/xattr.c b/fs/ntfs3/xattr.c index 385c50831a8d..bead9c3059ce 100644 --- a/fs/ntfs3/xattr.c +++ b/fs/ntfs3/xattr.c @@ -637,10 +637,9 @@ static noinline int ntfs_set_acl_ex(struct user_namespace *mnt_userns, err = 0; /* Removing non existed xattr. */ if (!err) { set_cached_acl(inode, type, acl); - if (inode->i_mode != mode) { - inode->i_mode = mode; - mark_inode_dirty(inode); - } + inode->i_mode = mode; + inode->i_ctime = current_time(inode); + mark_inode_dirty(inode); } out: