Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp31080737rwd; Thu, 6 Jul 2023 15:35:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlElzzogLdhaR8Gpo31pl/c1HgyZGJc/JbNHev53P7J+/B8vJ7kHiTNX63QMTjTp9YZAqXE4 X-Received: by 2002:a17:902:be0f:b0:1b8:b41a:d4be with SMTP id r15-20020a170902be0f00b001b8b41ad4bemr3305446pls.10.1688682947488; Thu, 06 Jul 2023 15:35:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688682947; cv=none; d=google.com; s=arc-20160816; b=IlKQQ9LJTdSAyNTUJuGP0AXMNxxZKqT9rCRbKCbCLn9UE4jqXS19vNibhXPjYjnkHc zZ12VSaIoDZf+s5ttMjnVyzWYSWgCwYtiy99A/BaQIhV/gYnXuQlPCCekSk+6W3UAovC HtWcSjB3702mXpzLIil2xCnQXsiS8d3syvoiCepmadb36WKEtCd5lyyrr66nuX2ZREdh wbXesizrzPJsfSC70lJz9ddMWGxVX0A8XT0/CmelBKroVOhiE5+KW1upZmvQx6KVxC2M bA1YQDap15VNYCR0VsGkpRj3m69mPZJ/VXees7yWy4uD0zbJ5SHfyiQrt5RgLwmFtj4m XG6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date:dkim-signature; bh=AOUdoCKv7lMKEBDeJuW8QLGANU11vjlDtc+UqVr1zFk=; fh=v4pNDss3qKxuOcY6vLrXM22+gVKNJRrIIMyMcMpR2WE=; b=r3fShNwtKyFs2/8gWXZDBHm+oGiPUzmXlXtLyXuLaU6mkOK0SM8s0El6vpftKl1++q ZYURypiL3/bY7Wep5h9pUtq+lbEQpk8LLGwvF8wSDM9cOUkAJIZNvMEFgV+SXAu4aPoK ItYOe2HARNnB0Clx1YW4dQXEa10DTk1apWkxGhePl+P3sdD4QgvbxVyiRxEEj9pqChY2 l0wAGHGwhXQ1R4DhNZAxeMZqI2h3IrX8XdduJGaXix3mK2Q5e0ow4hZaNzATTV7Wg1xP VHR6KfY96qHfjX3WHG7gwJQrio/fOXpTYkClapmuHv94yA8OgDsbc2KMUIKZn6oS8+cV N4ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@infradead.org header.s=zeniv-20220401 header.b=oejr2bmq; 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 p5-20020a170902780500b001b55160783dsi1904722pll.545.2023.07.06.15.35.32; Thu, 06 Jul 2023 15:35:47 -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=temperror (no key for signature) header.i=@infradead.org header.s=zeniv-20220401 header.b=oejr2bmq; 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 S231269AbjGFWND (ORCPT + 99 others); Thu, 6 Jul 2023 18:13:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbjGFWNC (ORCPT ); Thu, 6 Jul 2023 18:13:02 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 323951B6; Thu, 6 Jul 2023 15:13:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=AOUdoCKv7lMKEBDeJuW8QLGANU11vjlDtc+UqVr1zFk=; b=oejr2bmq1uN3b7HrJx+ElPbSw5 we3jUSGkXPajsm1VTvHviFC3GwS/NaHsz1QsPFRkvaUq7r+rBdyS2errjC3EY1PRnVjcDpGUlgYvK /1soI8bcSeGMJWZholjAS8+Qt+OwFn3a0aWHzps1cm/yKVnv/q2YxMXWdR874NBXlbeB4wr+Skl2c nM3+qFNFe9U/hWkDh9MMQME0URBrMEUda85VjmrM7Gu5M5Eh2LxPzWYWt/Fbt8l1kSRtIAT4twoVr jwlsg1lVsmOlMQlJWr5vCfx9rhtl9TtKl2S6xbuCXnbXSHWru+tXgvWDWT4P1WhYRdUGV2SMVYxDS 1rK8eJQg==; Received: from jlbec by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1qHXDb-0035IK-0N; Thu, 06 Jul 2023 22:12:55 +0000 Date: Thu, 6 Jul 2023 15:12:51 -0700 From: Joel Becker To: Jan Kara Cc: Jeff Layton , Christian Brauner , Christoph Hellwig , Al Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 32/92] configfs: convert to ctime accessor functions Message-ID: Mail-Followup-To: Jan Kara , Jeff Layton , Christian Brauner , Christoph Hellwig , Al Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230705185755.579053-1-jlayton@kernel.org> <20230705190309.579783-1-jlayton@kernel.org> <20230705190309.579783-30-jlayton@kernel.org> <20230706105446.r32oft4i3cj5bk3y@quack3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230706105446.r32oft4i3cj5bk3y@quack3> X-Burt-Line: Trees are cool. X-Red-Smith: Ninety feet between bases is perhaps as close as man has ever come to perfection. Sender: Joel Becker X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,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, Jul 06, 2023 at 12:54:46PM +0200, Jan Kara wrote: > On Wed 05-07-23 15:00:57, 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. > > > > Signed-off-by: Jeff Layton > > Looks good. Feel free to add: > > Reviewed-by: Jan Kara Agreed. Acked-by: Joel Becker > > Honza > > > --- > > fs/configfs/inode.c | 7 +++---- > > 1 file changed, 3 insertions(+), 4 deletions(-) > > > > diff --git a/fs/configfs/inode.c b/fs/configfs/inode.c > > index 1c15edbe70ff..fbdcb3582926 100644 > > --- a/fs/configfs/inode.c > > +++ b/fs/configfs/inode.c > > @@ -88,8 +88,7 @@ int configfs_setattr(struct mnt_idmap *idmap, struct dentry *dentry, > > static inline void set_default_inode_attr(struct inode * inode, umode_t mode) > > { > > inode->i_mode = mode; > > - inode->i_atime = inode->i_mtime = > > - inode->i_ctime = current_time(inode); > > + inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode); > > } > > > > static inline void set_inode_attr(struct inode * inode, struct iattr * iattr) > > @@ -99,7 +98,7 @@ static inline void set_inode_attr(struct inode * inode, struct iattr * iattr) > > inode->i_gid = iattr->ia_gid; > > inode->i_atime = iattr->ia_atime; > > inode->i_mtime = iattr->ia_mtime; > > - inode->i_ctime = iattr->ia_ctime; > > + inode_set_ctime_to_ts(inode, iattr->ia_ctime); > > } > > > > struct inode *configfs_new_inode(umode_t mode, struct configfs_dirent *sd, > > @@ -172,7 +171,7 @@ struct inode *configfs_create(struct dentry *dentry, umode_t mode) > > return ERR_PTR(-ENOMEM); > > > > p_inode = d_inode(dentry->d_parent); > > - p_inode->i_mtime = p_inode->i_ctime = current_time(p_inode); > > + p_inode->i_mtime = inode_set_ctime_current(p_inode); > > configfs_set_inode_lock_class(sd, inode); > > return inode; > > } > > -- > > 2.41.0 > > > -- > Jan Kara > SUSE Labs, CR -- Life's Little Instruction Book #237 "Seek out the good in people." http://www.jlbec.org/ jlbec@evilplan.org