Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp29493866rwd; Wed, 5 Jul 2023 12:42:13 -0700 (PDT) X-Google-Smtp-Source: APBJJlHNvhIhNveScZG74lBWUwDfZa87V454eXHKjmPVrr/PL7KcOsi09FhBf8QrXa9OyhWCPLtq X-Received: by 2002:a17:90a:5d86:b0:263:7d8:4a with SMTP id t6-20020a17090a5d8600b0026307d8004amr4543693pji.18.1688586133133; Wed, 05 Jul 2023 12:42:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688586133; cv=none; d=google.com; s=arc-20160816; b=X1q4bH0XFvYt4WjkWSIQmHru9O1egtWtrIkaB5ob3194HfosP2LE6rZseddCGdNVs4 vCO4XKZQ1PE/T80pR0/RDab8KbJVsX9vG61vClwKMjb8KbWQfJ6Zfz86hc7/Te5Pv9o+ 20KCDHgKzuIihtZJRzxIxWkQ5x2IsMhC0F8gKrM6V/vE7DgQIyk67eE1drYLwYYwsDB5 BZANdPrC4vaKM4xBB2z/yHO7ZDHWzMl4P5k0IEhe6Jy4fgVxWu7qrLpVmCMGIz+48BOb lnxmFeoXBLvbCAu08YUhADzoR+1zU+xIOoxPOLvIyiSTc7U2J0JUjtgxMlM78TGl6jbe LprQ== 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=iVH0ODKj9xrYjsqkKlQRc5cSls88JQbMRsmihy29JVs=; fh=Nb5M9mUNR71fvhOUuW8lXNObXvR+P8mbgKOmxFjIIdI=; b=LCVmAw57i1l/WtSgi8/+hZ5FmTgLk0RiKwV89ROOG+38Sq6bwdcz1TVHbwhLsM0ivf +4XUayaBWN1SuYOk/u2uadtD1yOWmMPQvWfJUxwoxPVT/kxxmylajusC6+6BmWGJAqKf rspKtR5bI78EaIyD2dbA6pSPsFkhmf/MHHJb/GG5NZ1JOJU679cM3wTFSF2HRCZ1EJBW cu2upURQW97OUhEy0IGe7pzEb1/Gm1B8poJirpCocAI3OeKcQXVwEYD4grEX+M/i8GRy tuDMsz6ZreB83rK8NWVi0H97bMgbKeiLsYBpgy/q8+LFWh2yJs0sx/z9EotXLG0tpYCz S8IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CXrkzL2s; 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 az9-20020a056a02004900b0055339136a7dsi5219116pgb.883.2023.07.05.12.41.59; Wed, 05 Jul 2023 12:42:13 -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=CXrkzL2s; 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 S233864AbjGETK2 (ORCPT + 99 others); Wed, 5 Jul 2023 15:10:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233740AbjGETIm (ORCPT ); Wed, 5 Jul 2023 15:08:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F338819A2; Wed, 5 Jul 2023 12:05:38 -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 568E161702; Wed, 5 Jul 2023 19:05:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0063AC433C7; Wed, 5 Jul 2023 19:05:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688583934; bh=3sp7OmcXVbe5zYzTxLB6I6YtUeT1soXk8Hp0RuH3SJI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CXrkzL2spbbappNHiT8iNIbL27Oyus1z08ocp1va0NyNPq9oRvpQ1kcmrnZeJJVkI F1v3lmptBoZi+Vc1Z0Ka9bpXjSDJdH1cjnhi87SQoeY5txF4eqSPlZf6aedJPdA3YI 6pV7JPX0/E8KkUivWlWkhH+qlm/XNCJo3IQcO5VFLRxClc1upAmSDdpZa+Zs3iwFrQ 4tfC78X0lU4Fh7+ArU2+Smf3jXdwJgPhcKFnmJz/t8i9ASJXMabyfeV4vdVf2Da0d0 iUzyljBH7cYr+75eftkoVsj8LLe/26Mg6zn63dRkqLwloGqFSa7MycG/KQ4Zy8FVfa 95WGghGW5aAOA== From: Jeff Layton To: Christian Brauner , Damien Le Moal , Naohiro Aota , Johannes Thumshirn Cc: Al Viro , Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 83/92] zonefs: convert to ctime accessor functions Date: Wed, 5 Jul 2023 15:01:48 -0400 Message-ID: <20230705190309.579783-81-jlayton@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230705190309.579783-1-jlayton@kernel.org> References: <20230705185755.579053-1-jlayton@kernel.org> <20230705190309.579783-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: X-Mailing-List: linux-kernel@vger.kernel.org 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. Acked-by: Damien Le Moal Signed-off-by: Jeff Layton --- fs/zonefs/super.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c index bbe44a26a8e5..eaaa23cf6d93 100644 --- a/fs/zonefs/super.c +++ b/fs/zonefs/super.c @@ -658,7 +658,8 @@ static struct inode *zonefs_get_file_inode(struct inode *dir, inode->i_ino = ino; inode->i_mode = z->z_mode; - inode->i_ctime = inode->i_mtime = inode->i_atime = dir->i_ctime; + inode->i_mtime = inode->i_atime = inode_set_ctime_to_ts(inode, + inode_get_ctime(dir)); inode->i_uid = z->z_uid; inode->i_gid = z->z_gid; inode->i_size = z->z_wpoffset; @@ -694,7 +695,8 @@ static struct inode *zonefs_get_zgroup_inode(struct super_block *sb, inode->i_ino = ino; inode_init_owner(&nop_mnt_idmap, inode, root, S_IFDIR | 0555); inode->i_size = sbi->s_zgroup[ztype].g_nr_zones; - inode->i_ctime = inode->i_mtime = inode->i_atime = root->i_ctime; + inode->i_mtime = inode->i_atime = inode_set_ctime_to_ts(inode, + inode_get_ctime(root)); inode->i_private = &sbi->s_zgroup[ztype]; set_nlink(inode, 2); @@ -1317,7 +1319,7 @@ static int zonefs_fill_super(struct super_block *sb, void *data, int silent) inode->i_ino = bdev_nr_zones(sb->s_bdev); inode->i_mode = S_IFDIR | 0555; - inode->i_ctime = inode->i_mtime = inode->i_atime = current_time(inode); + inode->i_mtime = inode->i_atime = inode_set_ctime_current(inode); inode->i_op = &zonefs_dir_inode_operations; inode->i_fop = &zonefs_dir_operations; inode->i_size = 2; -- 2.41.0