Message ID | 20230621144735.55953-19-jlayton@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp4438740vqr; Wed, 21 Jun 2023 08:14:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6VNyWhLksqMWuNCCPuUSP2nDe/r4zxfnoPQ3M3LLWys5rq4sYYV9ZoNYOAqQ98lJkdnS// X-Received: by 2002:a9d:7609:0:b0:6af:6f82:1e27 with SMTP id k9-20020a9d7609000000b006af6f821e27mr13077828otl.3.1687360463383; Wed, 21 Jun 2023 08:14:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687360463; cv=none; d=google.com; s=arc-20160816; b=gVeEQGZU5jyXsNScJH3Pf1Q4zQSkC4NqY0J8gTmRyV8QlYLLqOmdn3VHFP2e2I/jSL jVYlXDgdSh5efzYhTo/lZ/i3sfcF/5LQtIAvb99x0IDX4aoUp32VKuJ4iJ3eKfcp8huq DiCq7FzFLhV6IUGIUUwwkNRsCG2U67smiua+K6Gabsdoo3hhK9qyXM+MAIuiwaUOoQ5E alQ3D8YEzxRNVKGXhjTvPMMJqmJ/OPbHVWfzhoJLlpL5jkZtkKge50PEfTP1DLnBoGah 3y6ma7wIOD9wttIFcWs5cq+GEeYRWmh93LfN4QOgDierJSKYqUv++acpQI77bTutUIy8 CsNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ubZepQZUOvE18GQrTqFYdYOuYVBAB7Ea5ZT7oiSRgUE=; b=Oqwto5Tw9etK0FT0avO5aE84QXecuX0NCj3jMBOHOxhcgvoUEQKt9Q6IwN3BkMRMRl OPsgaT87B6QMCRCsjpPehV2RMH4ZOeJZJTlLLqykphTg2nbTx/EcT3L8O/gox8ZtJr1P A/9Qq0TIdWjLmeCR/mI47Hd+Lh1ubOnBqqb4/7/D625PtFT3s9jYX48mqWfwioEGSaHj 6YH29emo7/qSFfmOfZtWSTJkJWD8RJglmf8qx/lGpI68yJ+mKLYVp2+JfiDhuzqvj+nQ reT3SiFzc2T0Nm0jOT85a2i68hvT3y1qi6cgk/pGC+P6znkx5UTiUTnCoOyNrY7XjykI AscQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=q9lEJm3h; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f16-20020a635110000000b005572b13d220si2117429pgb.343.2023.06.21.08.14.10; Wed, 21 Jun 2023 08:14:23 -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=q9lEJm3h; 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 S232371AbjFUOul (ORCPT <rfc822;maxin.john@gmail.com> + 99 others); Wed, 21 Jun 2023 10:50:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230050AbjFUOth (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 21 Jun 2023 10:49:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8809F2690 for <linux-kernel@vger.kernel.org>; Wed, 21 Jun 2023 07:48:18 -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 A68AA6159A for <linux-kernel@vger.kernel.org>; Wed, 21 Jun 2023 14:48:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8CBC3C433C0; Wed, 21 Jun 2023 14:48:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687358889; bh=vzPEOgyxqOCaktmDwbXapks+d0FmANIoL7/H7EX46FQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q9lEJm3hzh3HO8gS2e9FdAKLPhWVnCLIlKqURQo59Y8p/5acagZxwfMRNn0wpU27X t1WK0rMIkofFBBodKmiD7OBo20SIc32KHkqiuFwx5eiRlimyvPmz716as7LX2UG4sF vkUhlcunvaafLJKf4CxSjWtkypQ2BcIy0WJkgD9VOam28yzWGfEaYYjlJHUHGZkcC7 cP/fcKwF1229IUK21aAJnYvRa0GpJWpKW2l7puwFrA32Ui7zg2GiR7T19MyA6KFZj1 bNo6MqzwuaX1C2Ptgj12KDHtIYb5JH/NSWcPdy76KRnKa4HjZLtmBsQ6SN9wITd+hx uInwNzb+pCAyg== From: Jeff Layton <jlayton@kernel.org> To: Christian Brauner <brauner@kernel.org>, Nicolas Pitre <nico@fluxnic.net> Cc: Al Viro <viro@zeniv.linux.org.uk>, Jan Kara <jack@suse.cz>, linux-kernel@vger.kernel.org Subject: [PATCH 20/79] cramfs: switch to new ctime accessors Date: Wed, 21 Jun 2023 10:45:33 -0400 Message-ID: <20230621144735.55953-19-jlayton@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230621144735.55953-1-jlayton@kernel.org> References: <20230621144507.55591-1-jlayton@kernel.org> <20230621144735.55953-1-jlayton@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769325685060786243?= X-GMAIL-MSGID: =?utf-8?q?1769325685060786243?= |
Series |
None
|
|
Commit Message
Jeff Layton
June 21, 2023, 2:45 p.m. UTC
In later patches, we're going to change how the ctime.tv_nsec field is
utilized. Switch to using accessor functions instead of raw accesses of
inode->i_ctime.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/cramfs/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Wed, 21 Jun 2023, Jeff Layton wrote: > In later patches, we're going to change how the ctime.tv_nsec field is > utilized. Switch to using accessor functions instead of raw accesses of > inode->i_ctime. > > Signed-off-by: Jeff Layton <jlayton@kernel.org> Acked-by: Nicolas Pitre <nico@fluxnic.net Yet all that's needed here is to simply set time entries to 0 as cramfs doesn't time stamp its files. It could as well be done with memset(). > --- > fs/cramfs/inode.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c > index 27c6597aa1be..039ce0f8858b 100644 > --- a/fs/cramfs/inode.c > +++ b/fs/cramfs/inode.c > @@ -133,7 +133,7 @@ static struct inode *get_cramfs_inode(struct super_block *sb, > } > > /* Struct copy intentional */ > - inode->i_mtime = inode->i_atime = inode->i_ctime = zerotime; > + inode->i_mtime = inode->i_atime = inode_ctime_set(inode, zerotime); > /* inode->i_nlink is left 1 - arguably wrong for directories, > but it's the best we can do without reading the directory > contents. 1 yields the right result in GNU find, even > -- > 2.41.0 > >
diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c index 27c6597aa1be..039ce0f8858b 100644 --- a/fs/cramfs/inode.c +++ b/fs/cramfs/inode.c @@ -133,7 +133,7 @@ static struct inode *get_cramfs_inode(struct super_block *sb, } /* Struct copy intentional */ - inode->i_mtime = inode->i_atime = inode->i_ctime = zerotime; + inode->i_mtime = inode->i_atime = inode_ctime_set(inode, zerotime); /* inode->i_nlink is left 1 - arguably wrong for directories, but it's the best we can do without reading the directory contents. 1 yields the right result in GNU find, even