Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30286266rwd; Thu, 6 Jul 2023 03:50:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlE0iJ8BnNfG8bM3byHEvYs1OOzajhZvO7ceLDvz5baN9y1awykWB6HvtZRQra/XJJ46d6K0 X-Received: by 2002:a81:7744:0:b0:577:24d9:4001 with SMTP id s65-20020a817744000000b0057724d94001mr1634496ywc.13.1688640621952; Thu, 06 Jul 2023 03:50:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688640621; cv=none; d=google.com; s=arc-20160816; b=tMYbMY6IlkIGlon4cIq66iDgj/1jSdVZ4x1WcS8mIeja499pS+4ul574Jo+3uN3Q3k h0+kKs8TR8p/FZbGd3PGpd0sS+Cl6xAkWqtgUl0rq7LnNP/okZphsiLJOzM4Tw4Tm26X KaJDgCzz5i6psNHR1fu/G1cfz+7BpJJvgdPGUTgNepX5tu9dNSn2uKjvmTA8syDs6nbE ZtMbTaep6WtMbUSz4RvwU+dW4djRKi6Q2kCZ5qSoPVzM/fX+nkcbJ88JZOYpZvbznub8 0BdavI8nD/P/jFAf2esyglnwuFsCIJ8pZfOJAOrECTiRM/NfDa9zn810BTrXO0nVPo8W NYcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=ZdLBu6A63hxyixyTpcewuhG1RM8NQH/INPJL9w63i7c=; fh=Lhk4rAweV/k2JKEFSwoyHQ4XNcnoYHp4gnOpiuy/7ew=; b=iuXlOCFE/amRwZAke5LIZrXXHjK9Ye1x1owKmncYb0y/GRLdjBe1HWDgbyGEAq2xvM f28Lfk3m+B7lyL4il/qbMqPHs5MR/RPNsRQHpMFE4pYFOLsV03YUHwwnjuXKWfttJcfc 4cJUhZZbaLEsbxMUYVFDKFGBR5emtY/mkvzvkrok2NOXDlezmwRso68+GfCtp3bGAuRg +OyOKrfcn+iidOXB7kOJOP8H8seEmsgIuIq04/nR2fXwsXio925LyX5bzBQxadr09v12 oV0WMpJuQAY5hbMVEwXOSxKGThZqsi9mlHk9HzXvlU20EFJgCVVUAuX9gM1BLmDb3EGJ AwbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=erR0FYTi; dkim=neutral (no key) header.i=@suse.cz header.b=WLaqslvY; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e8-20020a636908000000b005348fd7cb66si1146487pgc.873.2023.07.06.03.50.07; Thu, 06 Jul 2023 03:50:21 -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=@suse.cz header.s=susede2_rsa header.b=erR0FYTi; dkim=neutral (no key) header.i=@suse.cz header.b=WLaqslvY; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231577AbjGFKjN (ORCPT + 99 others); Thu, 6 Jul 2023 06:39:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229514AbjGFKjM (ORCPT ); Thu, 6 Jul 2023 06:39:12 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CDD519B2; Thu, 6 Jul 2023 03:39:11 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E2E1B21CD3; Thu, 6 Jul 2023 10:39:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1688639949; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ZdLBu6A63hxyixyTpcewuhG1RM8NQH/INPJL9w63i7c=; b=erR0FYTiUJ9lcXE4myuMPFUGk3UPLEFAmaGFYB/HLsjJzl8wM2WWL6VF8YUpawlRhMSeRS CAe0FYVgjGZSc6OoQIImk4gSW3yUirW28PHaqAOOQIfDctiNmnP7cFC5rqSCMamBt2ZGP6 gNrJLv5WRmEjSJpJmpaqLZrkHM4fsmA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1688639949; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ZdLBu6A63hxyixyTpcewuhG1RM8NQH/INPJL9w63i7c=; b=WLaqslvYyxkXuDmzLS2ALbntN/AblrkOA0S/tqnvar9Yslwz/RC1WtmEw//grDMli5fD+3 n16+XdFDSQH4JCDg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D6512138FC; Thu, 6 Jul 2023 10:39:09 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id qOhNNM2ZpmQaewAAMHmgww (envelope-from ); Thu, 06 Jul 2023 10:39:09 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 63B83A0707; Thu, 6 Jul 2023 12:39:09 +0200 (CEST) Date: Thu, 6 Jul 2023 12:39:09 +0200 From: Jan Kara To: Jeff Layton Cc: Christian Brauner , Namjae Jeon , Sungjong Seo , Al Viro , Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 12/92] exfat: convert to simple_rename_timestamp Message-ID: <20230706103909.jclg3nvltflqgwo2@quack3> References: <20230705185755.579053-1-jlayton@kernel.org> <20230705190309.579783-1-jlayton@kernel.org> <20230705190309.579783-10-jlayton@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230705190309.579783-10-jlayton@kernel.org> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,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 On Wed 05-07-23 15:00:37, Jeff Layton wrote: > A rename potentially involves updating 4 different inode timestamps. > Convert to the new simple_rename_timestamp helper function. > > Signed-off-by: Jeff Layton > --- > fs/exfat/namei.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c > index d9b46fa36bff..e91022ff80ef 100644 > --- a/fs/exfat/namei.c > +++ b/fs/exfat/namei.c > @@ -1312,8 +1312,8 @@ static int exfat_rename(struct mnt_idmap *idmap, > goto unlock; > > inode_inc_iversion(new_dir); > - new_dir->i_ctime = new_dir->i_mtime = new_dir->i_atime = > - EXFAT_I(new_dir)->i_crtime = current_time(new_dir); > + simple_rename_timestamp(old_dir, old_dentry, new_dir, new_dentry); > + EXFAT_I(new_dir)->i_crtime = current_time(new_dir); Hum, you loose atime update with this. Not that it would make sense to have it but it would probably deserve a comment in the changelog. Also why you use current_time(new_dir) here instead of say inode->i_ctime? > exfat_truncate_atime(&new_dir->i_atime); > if (IS_DIRSYNC(new_dir)) > exfat_sync_inode(new_dir); > @@ -1336,7 +1336,6 @@ static int exfat_rename(struct mnt_idmap *idmap, > } > > inode_inc_iversion(old_dir); > - old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir); > if (IS_DIRSYNC(old_dir)) > exfat_sync_inode(old_dir); > else Also there is: new_inode->i_ctime = EXFAT_I(new_inode)->i_crtime = current_time(new_inode); in exfat_rename() from which you can remove the ctime update? Honza -- Jan Kara SUSE Labs, CR