From patchwork Fri Jun 9 12:50:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 693120 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4CD3C87FDD for ; Fri, 9 Jun 2023 12:51:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241079AbjFIMvN (ORCPT ); Fri, 9 Jun 2023 08:51:13 -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 Precedence: bulk List-ID: X-Mailing-List: linux-efi@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));