Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30551112rwd; Thu, 6 Jul 2023 07:29:52 -0700 (PDT) X-Google-Smtp-Source: APBJJlFjaRQzx/lLdemj0WYcaPEBF+yakjMsNVhIt9NQj2ySh+gIVND+H7XhIUYYH77SFeTkkdKB X-Received: by 2002:a17:902:758c:b0:1b8:475d:ebf6 with SMTP id j12-20020a170902758c00b001b8475debf6mr2106353pll.0.1688653792513; Thu, 06 Jul 2023 07:29:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688653792; cv=none; d=google.com; s=arc-20160816; b=jVd60QVSBT/GboQMujsJwnY7jIFEHOUik1/qKvLEMiUdh3TFXYmVxGzqGHIsn1ZfCp esjxJWquMylip/GCOP3ovxltDGOaIRcQL20gBDlsdbE+Im2XpISaWIzh6ACDmwMyhKij VzNv6635XKAB7LdmjhwTxvFfOEK4nWw6cAqAAFDOOnLHRJDvdf8EHP0+X19/dnd/E1ka DrQ6wUcjSD1UpxgUDGA1gwfvujWpvDt4cCeSMfcJB+vqFcfj31r230KDxK8SE0ECaUoa x8tCU/8do0uq2SrQOuxigf2wTKrHyc60+GgvfkdBC3fjDaSRrkJEaJ2p0HSXDyMzwRpg CIFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=bGKZuFnwR9H+r3guZnQJMpBgYqLDY+o7Isb9+E5eqMg=; fh=K1ARTR6DcTCrEWcE+qAejCz4UbPlX0OQJ7vG4v0zUoc=; b=fs2dBzif3g7yfSV+j65qIPwT+8j8qA5FEIC+kFl15JsMVn9JQX0q/a/u4JDEoPKbFt FvyFQD9LlYRHIGRyQwaK/khXMdLIzADZ8zlg1cNcn+2r2+zLay25KklDN8aa6mLkYcCr MD1f5GBTv8mfpzb2NCweK7JbUxrv8g4EVg2jVZ0cUvjhQK7w4F6cB2c83vrbPnJW5U6q AxlBRx/0DMqUBsf7RSS9pUGi9WezJCaxGKZrrZAmHJf31TxV1z1nyYCNCreuUz3eqzjD nraZMt5w5bBXnStFH7YzPcXYgsUE2FmBrzzHoJ9zJREPwUzfQPXb1eXLrob7ZWTzrLYr e+vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kesckKw+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p3-20020a170902e34300b001b8820ab49fsi1330715plc.101.2023.07.06.07.29.36; Thu, 06 Jul 2023 07:29: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=@kernel.org header.s=k20201202 header.b=kesckKw+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232801AbjGFOBw (ORCPT + 99 others); Thu, 6 Jul 2023 10:01:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231721AbjGFOBq (ORCPT ); Thu, 6 Jul 2023 10:01:46 -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 797331BEA; Thu, 6 Jul 2023 07:01:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 063FC61988; Thu, 6 Jul 2023 14:01:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96C98C433C9; Thu, 6 Jul 2023 14:01:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688652100; bh=RA6lri/m2E0gZF1CUPwJ2FYbrnZahd6ULY8ragN/3e0=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=kesckKw+bfEGdhvNzfB/FTcNyo9kIoIxJAmreJAtPz5hlEge2OepS25Vnfv8LdNtG UmAD56IkEDbAtc3KXh8itsLP2qyj4cM3GRFg/N+Pt+FM0dZbj3gxmpkLre4xw7mjdT dz/NzVxZdjZk+/ERBLpiG1kWbq2LfAEVRJMKeBQ0SyvvXrhoTKzeS4m2QYtwOvHyhj K2iFbPJ+jSP8YS16H5edIBaMbB3EeE3rt/e4TT9XubaSg1aV+5NItRsBppnY56mY9e +AjNbAyNtv9lJ/Ltx0eC7I71PQL/GLPAN0VwMi6YSpSVtgXUlAhDQ7QecTBno7bSLW v2L11Dt5gcjsg== Message-ID: <8c7efbb0d8b79bd559795e5a29d18c76937f013b.camel@kernel.org> Subject: Re: [PATCH v2 66/92] overlayfs: convert to ctime accessor functions From: Jeff Layton To: Jan Kara Cc: Christian Brauner , Miklos Szeredi , Amir Goldstein , Al Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-unionfs@vger.kernel.org Date: Thu, 06 Jul 2023 10:01:38 -0400 In-Reply-To: <20230706135852.l2yu7xzffrhbctbb@quack3> References: <20230705185755.579053-1-jlayton@kernel.org> <20230705190309.579783-1-jlayton@kernel.org> <20230705190309.579783-64-jlayton@kernel.org> <20230706135852.l2yu7xzffrhbctbb@quack3> Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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 Thu, 2023-07-06 at 15:58 +0200, Jan Kara wrote: > On Wed 05-07-23 15:01:31, Jeff Layton wrote: > > In later patches, we're going to change how the inode's ctime field is > > used. Switch to using accessor functions instead of raw accesses of > > inode->i_ctime. > >=20 > > Reviewed-by: Amir Goldstein > > Signed-off-by: Jeff Layton > ... > > diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c > > index 21245b00722a..7acd3e3fe790 100644 > > --- a/fs/overlayfs/file.c > > +++ b/fs/overlayfs/file.c > ... > > @@ -249,10 +250,12 @@ static void ovl_file_accessed(struct file *file) > > if (!upperinode) > > return; > > =20 > > + ctime =3D inode_get_ctime(inode); > > + uctime =3D inode_get_ctime(upperinode); > > if ((!timespec64_equal(&inode->i_mtime, &upperinode->i_mtime) || > > - !timespec64_equal(&inode->i_ctime, &upperinode->i_ctime))) { > > + !timespec64_equal(&ctime, &uctime))) { > > inode->i_mtime =3D upperinode->i_mtime; > > - inode->i_ctime =3D upperinode->i_ctime; > > + inode_set_ctime_to_ts(inode, inode_get_ctime(upperinode)); >=20 > I think you can use uctime here instead of inode_get_ctime(upperinode)? > Otherwise the patch looks good. Feel free to add: >=20 > Reviewed-by: Jan Kara >=20 Thanks, fixed in tree. --=20 Jeff Layton