Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2029268rwd; Fri, 9 Jun 2023 05:52:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4zC8JRYygOPXYyosotg3KpixwK94T5ihoIqfS1IqOaXSeE/8p7zI8JrQz3Ap8lKOWiP2qK X-Received: by 2002:a17:902:e54a:b0:1b2:461:8d8a with SMTP id n10-20020a170902e54a00b001b204618d8amr1262652plf.35.1686315165567; Fri, 09 Jun 2023 05:52:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686315165; cv=none; d=google.com; s=arc-20160816; b=0RVy4npz9ummq/t2rtgpHOe7wUGVD3soEErzbIY0m0Zz/icgcgKp4Oq1aVAm+Yz3iB xU2txCzBtsckjnp/+ZQCwVDHzGvs8I8JkY5oaKpo6mH1y4Ot5zcphNZN6IpInrb6Z3eL 0e+QzDnorMNj6ta7ksbhXMBOcIepUtEnfKYouQfhNLI40E0yqC8wxtUcJL7ZdNd6jtWO 3ilOcozHYKFMcIMDllc0+LoOt+zSxS4FvzRYo47/pqDDfNsoUvY5tVoeDJ+4Ed0rVwcf c4lFtFtHSMT68TLLqmEhfwI2Kj+iDFqgjeOOSXiaDm0mSceQNaJ2DaE3d1+CR07Y7kX3 BgAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=lQCA5pjq7rt+eb+uL89FrplpwUwGQ+Qf3NdtBOOskXY=; b=iK2T8Bx8cEqjJO1tVJXkbpBstyWpPpethmQR0QILHnNzFhni+zyqZm1GDzMApQEXAi BpdFO8ZZJ4b9+ZSA8kY1+PGxeYXHDPEZFCUD8WKEGHWgoS2FpU/15mQekEbQb82rX2LG o74xvjMsIWe1MpcrHCxrd252HLD5tnHd6LaBwtr6BVJvMF8gowvpzm2XSjGL9BmdkO2h 9IM/eSuRgYMATfK30nKrtgnEjELcpHTVWsOLfGyBNFigunqfeAnlpJtbHhPnmIHCF2bz D8l45tkSs4q3ewPtfimYa9i9l6gls8ZsyxV/TVFFQg61bUvgl4CGdu6zWQ7xMW2zqdmn G04A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EhkPm7lB; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e8-20020a170902ef4800b001ab18eacb8csi2640807plx.526.2023.06.09.05.52.29; Fri, 09 Jun 2023 05:52:45 -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=@kernel.org header.s=k20201202 header.b=EhkPm7lB; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238767AbjFIMvZ (ORCPT + 99 others); Fri, 9 Jun 2023 08:51:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240918AbjFIMut (ORCPT ); Fri, 9 Jun 2023 08:50:49 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 077FB2D4A; Fri, 9 Jun 2023 05:50:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 90EAB657D3; Fri, 9 Jun 2023 12:50:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E991BC433D2; Fri, 9 Jun 2023 12:50:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686315048; bh=qpwJ/0eyyRtkYU9Ul0XQiBvv7dvzUbKLdiWoj7QNPo0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=EhkPm7lBafsHhSFhdMWAxFnhVa1gg77E/3Y2FS3tY9wIdwn/Kwr3CLysnbK8Ttmdl wfcVFnVEzMcrmn7bA7Fk31f1J2K3cBkZNMBm91VzYrjsotdZhnHnlm91sI8v1H4Bkp ezIFcfoYKApARBpHpMyt7CTNbRj8lW6k1+aju+ldxXX4DA598P7evqkNx5BZm0wuRP 1UHDzndA7v8LopmkkAy6ORkAHm+m0fSHDPtR/sh6T3mnpVlIJSeno8qTZAA6oPpqe6 G//4wZi7SQ8GAtejpm0uKQUyHeCSSoUAKdKS3TYbVkGZ2/+EG584ZznVNq86u7C3yq vgwdW20yudLdQ== From: Jeff Layton To: Christian Brauner , Al Viro , Brad Warrum , Ritu Agarwal , Arnd Bergmann , Greg Kroah-Hartman , Ian Kent , "Tigran A. Aivazian" , Jeremy Kerr , Ard Biesheuvel , Namjae Jeon , Sungjong Seo , Bob Peterson , Andreas Gruenbacher , Steve French , Paulo Alcantara , Ronnie Sahlberg , Shyam Prasad N , Tom Talpey , John Johansen , Paul Moore , James Morris , "Serge E. Hallyn" , Ruihan Li , Suren Baghdasaryan , Sebastian Reichel , Wolfram Sang , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, autofs@vger.kernel.org, linux-efi@vger.kernel.org, linux-fsdevel@vger.kernel.org, cluster-devel@redhat.com, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, apparmor@lists.ubuntu.com, linux-security-module@vger.kernel.org Subject: [PATCH 6/9] exfat: ensure that ctime is updated whenever the mtime is Date: Fri, 9 Jun 2023 08:50:20 -0400 Message-Id: <20230609125023.399942-7-jlayton@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230609125023.399942-1-jlayton@kernel.org> References: <20230609125023.399942-1-jlayton@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Signed-off-by: Jeff Layton --- fs/exfat/namei.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c index e0ff9d156f6f..d9b46fa36bff 100644 --- a/fs/exfat/namei.c +++ b/fs/exfat/namei.c @@ -817,7 +817,7 @@ static int exfat_unlink(struct inode *dir, struct dentry *dentry) ei->dir.dir = DIR_DELETED; inode_inc_iversion(dir); - dir->i_mtime = dir->i_atime = current_time(dir); + dir->i_mtime = dir->i_atime = dir->i_ctime = current_time(dir); exfat_truncate_atime(&dir->i_atime); if (IS_DIRSYNC(dir)) exfat_sync_inode(dir); @@ -825,7 +825,7 @@ static int exfat_unlink(struct inode *dir, struct dentry *dentry) mark_inode_dirty(dir); clear_nlink(inode); - inode->i_mtime = inode->i_atime = current_time(inode); + inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode); exfat_truncate_atime(&inode->i_atime); exfat_unhash_inode(inode); exfat_d_version_set(dentry, inode_query_iversion(dir)); @@ -979,7 +979,7 @@ static int exfat_rmdir(struct inode *dir, struct dentry *dentry) ei->dir.dir = DIR_DELETED; inode_inc_iversion(dir); - dir->i_mtime = dir->i_atime = current_time(dir); + dir->i_mtime = dir->i_atime = dir->i_ctime = current_time(dir); exfat_truncate_atime(&dir->i_atime); if (IS_DIRSYNC(dir)) exfat_sync_inode(dir); @@ -988,7 +988,7 @@ static int exfat_rmdir(struct inode *dir, struct dentry *dentry) drop_nlink(dir); clear_nlink(inode); - inode->i_mtime = inode->i_atime = current_time(inode); + inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode); exfat_truncate_atime(&inode->i_atime); exfat_unhash_inode(inode); exfat_d_version_set(dentry, inode_query_iversion(dir)); -- 2.40.1