From mboxrd@z Thu Jan 1 00:00:00 1970 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 73C49EB64D9 for ; Thu, 6 Jul 2023 10:33:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230372AbjGFKdl (ORCPT ); Thu, 6 Jul 2023 06:33:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229514AbjGFKdk (ORCPT ); Thu, 6 Jul 2023 06:33:40 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71094124; Thu, 6 Jul 2023 03:33:39 -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 14BAF2233A; Thu, 6 Jul 2023 10:33:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1688639618; 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=NiVsKdAXkC4C1ti6b6hv0jp+iKes0bsFerqPpfs57dM=; b=glfJHcFpaeYEutx1HDXD6eVdg0ILBGXBa4bW5YEn3PVWWtV34go0pHkIrRRU0YtNXQ19wx cteoX9cc3qVvs5jzstomNCgKata7JaGt1xP+2qhMqSO4MJQXPiJUTcUzpwSZBKiyy89e+m mzacgXc0cQE7M3MSwC3GaTjTFfK98jM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1688639618; 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=NiVsKdAXkC4C1ti6b6hv0jp+iKes0bsFerqPpfs57dM=; b=X+YQuFhWtWCgxTpI6PkCQKgC7yYru0ex9ES/5Ey/+4mRL9wl5p76yxAPtjmyHpNr09H7QR KmPtM5l/HPzYrEAA== 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 EC821138FC; Thu, 6 Jul 2023 10:33:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id GC2xOYGYpmRLeAAAMHmgww (envelope-from ); Thu, 06 Jul 2023 10:33:37 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 715A0A0707; Thu, 6 Jul 2023 12:33:37 +0200 (CEST) Date: Thu, 6 Jul 2023 12:33:37 +0200 From: Jan Kara To: Jeff Layton Cc: Christian Brauner , Hugh Dickins , Andrew Morton , Al Viro , Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v2 11/92] shmem: convert to simple_rename_timestamp Message-ID: <20230706103337.phdkyo6yylua6pdf@quack3> References: <20230705185755.579053-1-jlayton@kernel.org> <20230705190309.579783-1-jlayton@kernel.org> <20230705190309.579783-9-jlayton@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230705190309.579783-9-jlayton@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Wed 05-07-23 15:00:36, 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 to me. Feel free to add: Reviewed-by: Jan Kara Honza > --- > mm/shmem.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/mm/shmem.c b/mm/shmem.c > index 0f45e72a5ca7..1693134959c5 100644 > --- a/mm/shmem.c > +++ b/mm/shmem.c > @@ -3306,9 +3306,7 @@ static int shmem_rename2(struct mnt_idmap *idmap, > > old_dir->i_size -= BOGO_DIRENT_SIZE; > new_dir->i_size += BOGO_DIRENT_SIZE; > - old_dir->i_ctime = old_dir->i_mtime = > - new_dir->i_ctime = new_dir->i_mtime = > - inode->i_ctime = current_time(old_dir); > + simple_rename_timestamp(old_dir, old_dentry, new_dir, new_dentry); > inode_inc_iversion(old_dir); > inode_inc_iversion(new_dir); > return 0; > -- > 2.41.0 > -- Jan Kara SUSE Labs, CR