Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp29493522rwd; Wed, 5 Jul 2023 12:41:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4e1WAfGtYMAah0xb0KKjHQ+6w7y2aV87+QTzwFVnEdZtOihPWxAdLjdw4cZDr577e2yoCZ X-Received: by 2002:a05:6808:1910:b0:3a1:dc2a:a1dd with SMTP id bf16-20020a056808191000b003a1dc2aa1ddmr17947317oib.47.1688586110722; Wed, 05 Jul 2023 12:41:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688586110; cv=none; d=google.com; s=arc-20160816; b=KQNRZJjq/R4WwsBPWNxkfhNREpSOphbBH0c9FJPYHF3cFd16w1zZ13fv69MCTgF83u mkdQtxd+ev48JyHO9sF+zUKShORsfXFz1kMjk/c7/t0PEfsQeX1LUPl13Q6SJ7cjbBLc VZvLzwlc1YT1S/0G8VNOOG08Tn5iPSdA1jS9GCBCKaS3sX2HN2CtGATSjtUxq14jrNWX /PzDQz7WDgid4FJxXMkQpd7njGIOqx8O6HpZKiZvdWSHtBhSvT1L3X9fDd1zn3igQas8 6BDQegLJjqwK4UwO0sDQvtVfOptpk/6znupBmgV/8dtznjQqDWfLRzGVbi7BybI7U3fF BQFw== 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:cc:to:from :dkim-signature; bh=dijRCGJ7wEiaVvOKI/kUzn8r5ldTe/owd4sFfXYL27s=; fh=Nk/0tMRLb8D+wJo4Zmm3v7/GPXN2K9PAwHUJV3gzhLs=; b=gjmUKutmZUqGLvDtk6t9VFLqyMEPleR1Kvz9vYWOo+B+ODFZ3PvS4tQu4USAOEqAzs JvoAVtLeJ4DkORoHCLJqcdczc50XasLA9R+3xeZD96ZBIpSBMtVQ3KymOk5Y49mNdBA5 F+On+59+Pcva0sqN+SoP/aFwDQWwvWjootk0gkGcF9O+GfZ0VyyEoqLmN6DS3p5M77BR aWjFgVuDmkKsCFlLJbP2Kxny9LE9A3Q+4OSzgHqK9EyQ4BIdLUoi1kzgqF9zrV1TtZl7 sBDDsm8WKYDuD+CxKqub/eRWV5jn+z1h/dIYuvIu2iW+DWjFr/ee9pK2DmCWg2H/XhWH svxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BwjgVC7C; 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 s11-20020a63dc0b000000b005573a9229f0si24463834pgg.841.2023.07.05.12.41.38; Wed, 05 Jul 2023 12:41:50 -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=BwjgVC7C; 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 S233462AbjGETD0 (ORCPT + 99 others); Wed, 5 Jul 2023 15:03:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233396AbjGETDS (ORCPT ); Wed, 5 Jul 2023 15:03:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90EFC1985; Wed, 5 Jul 2023 12:03:16 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2E845616EF; Wed, 5 Jul 2023 19:03:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DED71C433C8; Wed, 5 Jul 2023 19:03:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688583795; bh=C29zaLc0+YewpaXSEH0HW42gKnjE7YUcBZ4P7Z6b8Hg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BwjgVC7Cbh9HQG2vDydlZGjLCZkcX1Ds3CLZ61K/xriTZaI/1UBNBiDzxP+g/dIZB Z1b9xp3sy523k6IzA0saIP3vpzd2L1B4S325qj1QrjG92VPEgqhl6mxOiyELZ2DqM8 OREJCtRhqTLktGuNCrpzYO/VV2b9RmtMCTbA6+UzGIMzOwW9Iel67mauV7xvmtiGiM McJ3467i8G17Xwv2uQ1SP2RdJGHk3OTuiK55GkB144F4uQV8kGRbZme9vY+WHZ6hww 9lU1DH4+FoNn400oj2U5B9F2VN6u9FxOY28tE9cjuCXHgVDa4fPKe/PQZDbGfgcPfh GlYx1XFDP2Qog== From: Jeff Layton To: Christian Brauner , Namjae Jeon , Sungjong Seo Cc: Al Viro , Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 04/92] exfat: ensure that ctime is updated whenever the mtime is Date: Wed, 5 Jul 2023 15:00:31 -0400 Message-ID: <20230705190309.579783-4-jlayton@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230705190309.579783-1-jlayton@kernel.org> References: <20230705185755.579053-1-jlayton@kernel.org> <20230705190309.579783-1-jlayton@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 When removing entries from a directory, the ctime must also be updated alongside the mtime. 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.41.0