Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30285791rwd; Thu, 6 Jul 2023 03:49:52 -0700 (PDT) X-Google-Smtp-Source: APBJJlEeNCM/7AAiCH+T4Sdlvp6zsmLgKRMBvZVaRHUqZZGGoq2PazbZ5B0CcbtGtRzZo1btxvHc X-Received: by 2002:a05:6a21:33a9:b0:125:c3f7:f863 with SMTP id yy41-20020a056a2133a900b00125c3f7f863mr7342115pzb.8.1688640592153; Thu, 06 Jul 2023 03:49:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688640592; cv=none; d=google.com; s=arc-20160816; b=KGub2HO+W6q2bsPQ4YQ5Wfk8iVnwHA/QcUtQE6cEM0uigaH3yASaEqO3Y8dtp6CWN2 Zpt69XkdLzka2Tk2HQbsi/qlkh3tTo69nVbS256m2+G7Ejf4ZRo/qfZlYL3q/EWfmS+c ze3FCtYE+rNJDhX41rXIa1LvRlK5Iizs2e/XQ9bI0u3kJ3AoetCZ0w0Jc8IprCY9OeOm KLls5yus+Z6xD8bk+lOMKp8AY+JcEYQeHZ8Sm4VnJDdMNSf7ObmbdR/ngeS8iXgQg27c WgVI/caPMif36VVfFyXptUEEUHNrLfG4c7z2A83gMo1V8irj/AUek1eZzVZAWmFVX4RX qCtQ== 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=AtPqbv/I5XTvRHzRa1le0miyUrAIJk4DE9riJNaL0W4=; fh=+QwFz+KxVW7v90RbG6zsV5TGxaiYbF2ybQTGhbPVU5k=; b=cRNlwK3mPnIIAuadbk2yKtoov1B1Zl73SHbUYeTbjjI7YFMFC32unXaB6Rrgy+9Jso So0AtW1+vNT19Y28eyKszlRTenWJEHfDua5pJyWga++K5SQ7ummYxzbLW3sE1Y0f2BDu Pk2/1wh2RZ1QNdVG4XXRMlTk3o78vdayDJeD6cKKJXxSaH5kuMSdmklRHs3JkaLur1im RUz++38fSGGPsG0HSbogWYTT9TrXKw4VCyoKDU8MGcNaVm9t4jagh9LvhgN4UveUlfip NRzU9LmhHNL2abldNHnw6P2SzsucmkPjFDzgW9k90cOUcNC7j1kIr5kQNd+cgUZrPmBb tGeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="kYlD/4Y1"; dkim=neutral (no key) header.i=@suse.cz; 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 e10-20020a63690a000000b0055bce775e6fsi1225882pgc.455.2023.07.06.03.49.38; Thu, 06 Jul 2023 03:49:52 -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="kYlD/4Y1"; dkim=neutral (no key) header.i=@suse.cz; 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 S231703AbjGFKk3 (ORCPT + 99 others); Thu, 6 Jul 2023 06:40:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229509AbjGFKk2 (ORCPT ); Thu, 6 Jul 2023 06:40:28 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C8DF19B2; Thu, 6 Jul 2023 03:40:27 -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-out2.suse.de (Postfix) with ESMTPS id ED57C2019E; Thu, 6 Jul 2023 10:40:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1688640025; 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=AtPqbv/I5XTvRHzRa1le0miyUrAIJk4DE9riJNaL0W4=; b=kYlD/4Y11bqPwRxjACIaXhrUB5JS5c0IcjFm+K1U2d7mhFQ4NJX58DF+IjRMGdkMwXlfnt kUWpbAZxfhsgQHbYqymse72ZrpUkQijkl8l6oOajA8mixabYyhpNIT5psP6n7kyWXboI/h I6QcHlTlrHZk5Ds1ia0uxdnyE1rh9ro= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1688640025; 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=AtPqbv/I5XTvRHzRa1le0miyUrAIJk4DE9riJNaL0W4=; b=FPZWntPHr5F/tAZlUZEaLRKY0UnmVO17+4grDsFTYxmL+8MptQVtk4TuevTPery7QdcufA u86dJcECBFjUuaDw== 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 DF1AC138FC; Thu, 6 Jul 2023 10:40:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id CtJ1NhmapmTZewAAMHmgww (envelope-from ); Thu, 06 Jul 2023 10:40:25 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 7DE80A0707; Thu, 6 Jul 2023 12:40:25 +0200 (CEST) Date: Thu, 6 Jul 2023 12:40:25 +0200 From: Jan Kara To: Jeff Layton Cc: Christian Brauner , Konstantin Komarov , Al Viro , Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, ntfs3@lists.linux.dev Subject: Re: [PATCH v2 13/92] ntfs3: convert to simple_rename_timestamp Message-ID: <20230706104025.gm66visyl3cer7vs@quack3> References: <20230705185755.579053-1-jlayton@kernel.org> <20230705190309.579783-1-jlayton@kernel.org> <20230705190309.579783-11-jlayton@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230705190309.579783-11-jlayton@kernel.org> X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_SOFTFAIL,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:38, 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 Looks good. Feel free to add: Reviewed-by: Jan Kara Honza > --- > fs/ntfs3/namei.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/fs/ntfs3/namei.c b/fs/ntfs3/namei.c > index 70f8c859e0ad..bfd986699f9e 100644 > --- a/fs/ntfs3/namei.c > +++ b/fs/ntfs3/namei.c > @@ -324,14 +324,11 @@ static int ntfs_rename(struct mnt_idmap *idmap, struct inode *dir, > /* Restore after failed rename failed too. */ > _ntfs_bad_inode(inode); > } else if (!err) { > - inode->i_ctime = dir->i_ctime = dir->i_mtime = > - current_time(dir); > + simple_rename_timestamp(dir, dentry, new_dir, new_dentry); > mark_inode_dirty(inode); > mark_inode_dirty(dir); > - if (dir != new_dir) { > - new_dir->i_mtime = new_dir->i_ctime = dir->i_ctime; > + if (dir != new_dir) > mark_inode_dirty(new_dir); > - } > > if (IS_DIRSYNC(dir)) > ntfs_sync_inode(dir); > -- > 2.41.0 > -- Jan Kara SUSE Labs, CR