Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30287876rwd; Thu, 6 Jul 2023 03:52:07 -0700 (PDT) X-Google-Smtp-Source: APBJJlGYC5iZYBjSjImkIC+8nLZlyWRtMYNlwh72kYV7ecAIbfHQwv1nruyRbqHi7B1Mt3XjVsow X-Received: by 2002:a17:90b:a15:b0:262:c9f4:141 with SMTP id gg21-20020a17090b0a1500b00262c9f40141mr1225746pjb.42.1688640727581; Thu, 06 Jul 2023 03:52:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688640727; cv=none; d=google.com; s=arc-20160816; b=z0Pvv1SHcAiiACbiYHBK9MEYoZ08xGm++L/bwQavIsGO9KKf0QDSAitei92ll5/K2X lBlrDEEhB6AZWmX0S55bE6AhfmgsK2R2rztPWPsPX3BlTMXVj3Ut/j5dZwFe0/JVTW+J bWN3iNIIZmHXKdISbSBfVM3iZ4yBNWAK7ymgrOB7lVNQcp84wzLfA00e6s6rgWOg8WQA g0m68tExA5FfSNVyrdr13MGvqOT7svsTBPCN1rtDg9dPYure3CHZMcEIx92SspSfrEQz rvcqQ6oCxCRR6nJIV8D6zZdaRhWVmvsZjj0d4XN19Rx1r4qyrdRirusD07HppTR2feY5 90UQ== 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=NiVsKdAXkC4C1ti6b6hv0jp+iKes0bsFerqPpfs57dM=; fh=s4QIz/sdazeb62cnw7peC71DiAVMjwJR6tQPhc3Pvek=; b=HnI66arQQzeXQ4OyHfEANn1rixRFGtbTb6FNQs5qaAVZU5j0VSWThJTwTIGMQ8gA6H sUpwXTpxoW1JwqpDo2EYxHRlcuIef9rzuvaPqOQOBQrR+Gt1oD7pjDbbgyEq0NjwmW7g faU9bGb7kxjV7TOKoL1z0mYl88f5cIYTUWWwJrh8pEcM9yVbliezaeqHWs0wz/T4iY8Z FlI36vaZUjCTCXa62erO+7W0K0NvXa3g1pPdtrsfCxDcdrhTJmaUbH13FMA1lOtW577+ fVSDXsvdSyGPeoQxyOhKULE5M1+zAc5zfW5UAICtueQuAlgNAphxwfX4BseXsJ3SKtN9 4WLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=glfJHcFp; 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 i11-20020a63e44b000000b0055bdf89c9d8si1156973pgk.436.2023.07.06.03.51.53; Thu, 06 Jul 2023 03:52:07 -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=glfJHcFp; 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 S231367AbjGFKdl (ORCPT + 99 others); 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> 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: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