Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30300822rwd; Thu, 6 Jul 2023 04:04:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlGsJ/joETXB7AUE2Os1W4E7AxzjqUywVei5/cYvrq3avqNpbJvdhCWhXW5qXSlCapffY5d6 X-Received: by 2002:a05:6a00:248e:b0:674:ff6d:1b39 with SMTP id c14-20020a056a00248e00b00674ff6d1b39mr1968948pfv.9.1688641455076; Thu, 06 Jul 2023 04:04:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688641455; cv=none; d=google.com; s=arc-20160816; b=BEYhbg8/OyJ/ESpNu0YLu/AG5N9Tq9LCrAZfhBwD4virUYxuMKT/9qm8bPFBHJIVAm JPMcFQFXo0G1U2WtO3VbIIQjgiLKdGmNp8H8qPZdneBeSGcx070rWtUf3epLdPTbpBXH A+V3bsdMh+sSm5rqr0fxi1qtqQIM8tfmgR6Sr+Xj03CKW5cetzn2CxgWSQdWk+X9YEb2 0IxixZ2kJXtTUpiEKIS2yh2RbP6jDgVHSkOfKGgeyc4WDKNfrrGqJaUGnbgKDqGJjBJk rqWpZcYPc5+Vfgu4MkI0f17Zc1J5+ICyg/Q3wTt1e0tIdyHUKHGv3crF1mBhZkvYQg/y rTOg== 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=jRN3hCijOOkQXaBGoxP+fei8gl0a0X8LOKYqS6sTjSg=; fh=VcBAY5PmfziCPAPoWOIk0GAMY2EaqQ1kHxT/d8Utwe8=; b=tLEO5QQ11fL3gY3yPkDhoU9EmiNZSpvfit1In3zfyVmeQSFoLdFcIQGZj+cWLtJoEt 5kLYYT47iXjiSfwikdSdOISU0D+OYO1R6pGCBojaeS0HxO0Q5r7Ok8zHxXOFn1OuNqrw tnGKzSDY9wdtS7CM/YY/ICiyD0EyH8p4RGys6PPpMj7geBQHDNT2Jygc8KqvVQNBjpx3 vvgf/LsGUXUQXGpdTp+P7wJ/zC/NOhtsIi/8YVbFEPoD5haTqREBCGD9TTPf1VxW+RDV UlWLJ1hckIE5VtOx7mAakGJLKUOXvFlQQ9QwK2vLDRk6HsKHAbBFlw4ely8y38KQzUhy ou/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="ClMOYx/M"; 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 dc6-20020a056a0035c600b0066c72802132si1159371pfb.369.2023.07.06.04.04.00; Thu, 06 Jul 2023 04:04:15 -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="ClMOYx/M"; 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 S232449AbjGFKzm (ORCPT + 99 others); Thu, 6 Jul 2023 06:55:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232346AbjGFKzN (ORCPT ); Thu, 6 Jul 2023 06:55:13 -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 84376212D; Thu, 6 Jul 2023 03:54:48 -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 2BB7720535; Thu, 6 Jul 2023 10:54:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1688640887; 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=jRN3hCijOOkQXaBGoxP+fei8gl0a0X8LOKYqS6sTjSg=; b=ClMOYx/MLZSr2uMqUZVBuskfjL//VlImIy44TrudSoCor4uMz8hH8Id6B5yQncTb6eAAI9 D2vTCuK5u40idJyXyp1nZd/GZGz5Cu0anadmKCsAE45BVD6dG4bZRots+BdkC80mowC2WS UdrDk4T0Xaw9OTf6bBdiU8luCSGkbEo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1688640887; 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=jRN3hCijOOkQXaBGoxP+fei8gl0a0X8LOKYqS6sTjSg=; b=8zJI2iKEN2Inh2dswV7ZlYXx2ncvTFbxm8R7IyZoFZxtswr3i8HtJ+ahGv1R354FfvmyI1 pNdFCL6Z3Yq+hJDw== 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 1EBA2138EE; Thu, 6 Jul 2023 10:54:47 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id N9F3B3edpmTtBAAAMHmgww (envelope-from ); Thu, 06 Jul 2023 10:54:47 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id A9769A0707; Thu, 6 Jul 2023 12:54:46 +0200 (CEST) Date: Thu, 6 Jul 2023 12:54:46 +0200 From: Jan Kara To: Jeff Layton Cc: Christian Brauner , Joel Becker , Christoph Hellwig , Al Viro , Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 32/92] configfs: convert to ctime accessor functions Message-ID: <20230706105446.r32oft4i3cj5bk3y@quack3> References: <20230705185755.579053-1-jlayton@kernel.org> <20230705190309.579783-1-jlayton@kernel.org> <20230705190309.579783-30-jlayton@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230705190309.579783-30-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: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 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