Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9474929rwd; Wed, 21 Jun 2023 07:56:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6vVgi8tGbzjH7QfP1GhkxaPPEcsjv5O2NcFfO+5B1R/zKSlmAZx5vSSARPjXxuBlfHJMUe X-Received: by 2002:a05:6808:13ce:b0:39e:769b:a89c with SMTP id d14-20020a05680813ce00b0039e769ba89cmr18661395oiw.29.1687359387676; Wed, 21 Jun 2023 07:56:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687359387; cv=none; d=google.com; s=arc-20160816; b=jAfkNlEXPfoukNQUMrB6GXfXxWorTA7Ezn+tx9gRPUj5Sh7vRijsSoGiNzkqZwpPXK IIU0VoOSHlyXldxU8mlo0/LHORmRoqTdYWxh6Tegc2X31SIDT9It5zNQlanitYQemLm2 kE5ZY3+PR2Swqaar5KH5T5Wn9HZlVTbIQcH7YKpLyJucR56tguknQVGkew6H5wbTHvFg MY8b0U6xwCEvkngLYQYDHzW6KCTPv2J69e7DzWY3UDrbrqsGZUp8gRfGaHHvW6eADkuO M3o7tw4rv9nAT9FIiaEQJhXYWUp+ESEcUbXFxLBmnieffG9KS5RZLqVXYhQ7Lm74Khf+ gqJQ== 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=kc/DyfV1dXHVVmYzSjfJdfGGaKxPGFGYYLNuU5/No+4=; b=O2UPKbg8est4SSER7CG44/n+wbp2KXXz7D9SqtfQapYCeILTMVSoScWdEEufAaA0lE DrDF1p0E6bq1WvPr8/UpAVLtsJvMm72AjBAwYOR2fWD2xA6rfaAu4s/h1d7vCuzrz96O UTksJn9fvXcVFD+tZQAvSnCAqYp+0ykFN2RtRV0lM9s/hpF4Fe6yvq2PcS5uKOJpTKhu dwzjpF14QF13Gui7cGMBB5sjCoJNWVnKo03v5MYW9p1P4llK+74mVmkJe2h06LH7w8hD YV3rSDaCoo1oWpXiPZoD5ylW2IhZ9qQdDehF671NylFr9pLWskKqI0gEz+4ZPH/9OEbQ kQpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hcsmB7v6; 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 c5-20020a6566c5000000b00553ced07d18si362933pgw.295.2023.06.21.07.56.11; Wed, 21 Jun 2023 07:56:27 -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=hcsmB7v6; 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 S232659AbjFUOwN (ORCPT + 99 others); Wed, 21 Jun 2023 10:52:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232482AbjFUOu4 (ORCPT ); Wed, 21 Jun 2023 10:50:56 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2F612972 for ; Wed, 21 Jun 2023 07:48:54 -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 E341D6159D for ; Wed, 21 Jun 2023 14:48:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A180C433C0; Wed, 21 Jun 2023 14:48:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687358897; bh=cPzAVbFk9R0HnrShvi8rLzBxv97vtXRMRe2hrktiDrk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hcsmB7v6zbEyvEiZhHfjQHIdGckqwKegVeEVgJ4Igrqhii8bcPxx1YnlpDrpZFirt mxZ4y5XlQKvC2fmPnr2y0g7pGzBBgLi3oM4egpOaxz7t2sS/uDiRn4Pwky3B+39Un4 DxF5i0YIVMefv25QXIkzZfvBkc9fbEbs2xRcoYFa+dtuRekYdpqrNaCPEUlCZDKahg pYTF19rBuLHzyN6Imn9cfxrPQSXHdZPZ/FX2vLnzeDGIWU99DBBz34MOlO8F1IFRUh pEGwQ8EqQ+MOwkxxCXi+h+x9kLxdPv1Q3l/lWUzV7oJKvqKHcjQMkHF6e4aoXDDFvy CrYAbHgYPlRrg== From: Jeff Layton To: Christian Brauner , Gao Xiang , Chao Yu , Yue Hu , Jeffle Xu Cc: Al Viro , Jan Kara , linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH 26/79] erofs: switch to new ctime accessors Date: Wed, 21 Jun 2023 10:45:39 -0400 Message-ID: <20230621144735.55953-25-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: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- fs/erofs/inode.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fs/erofs/inode.c b/fs/erofs/inode.c index d70b12b81507..8af56d6d0ff3 100644 --- a/fs/erofs/inode.c +++ b/fs/erofs/inode.c @@ -105,8 +105,8 @@ static void *erofs_read_inode(struct erofs_buf *buf, set_nlink(inode, le32_to_cpu(die->i_nlink)); /* extended inode has its own timestamp */ - inode->i_ctime.tv_sec = le64_to_cpu(die->i_mtime); - inode->i_ctime.tv_nsec = le32_to_cpu(die->i_mtime_nsec); + inode_ctime_set_sec(inode, le64_to_cpu(die->i_mtime)); + inode_ctime_set_nsec(inode, le32_to_cpu(die->i_mtime_nsec)); inode->i_size = le64_to_cpu(die->i_size); @@ -148,8 +148,8 @@ static void *erofs_read_inode(struct erofs_buf *buf, set_nlink(inode, le16_to_cpu(dic->i_nlink)); /* use build time for compact inodes */ - inode->i_ctime.tv_sec = sbi->build_time; - inode->i_ctime.tv_nsec = sbi->build_time_nsec; + inode_ctime_set_sec(inode, sbi->build_time); + inode_ctime_set_nsec(inode, sbi->build_time_nsec); inode->i_size = le32_to_cpu(dic->i_size); if (erofs_inode_is_data_compressed(vi->datalayout)) @@ -176,10 +176,10 @@ static void *erofs_read_inode(struct erofs_buf *buf, vi->chunkbits = sb->s_blocksize_bits + (vi->chunkformat & EROFS_CHUNK_FORMAT_BLKBITS_MASK); } - inode->i_mtime.tv_sec = inode->i_ctime.tv_sec; - inode->i_atime.tv_sec = inode->i_ctime.tv_sec; - inode->i_mtime.tv_nsec = inode->i_ctime.tv_nsec; - inode->i_atime.tv_nsec = inode->i_ctime.tv_nsec; + inode->i_mtime.tv_sec = inode_ctime_peek(inode).tv_sec; + inode->i_atime.tv_sec = inode_ctime_peek(inode).tv_sec; + inode->i_mtime.tv_nsec = inode_ctime_peek(inode).tv_nsec; + inode->i_atime.tv_nsec = inode_ctime_peek(inode).tv_nsec; inode->i_flags &= ~S_DAX; if (test_opt(&sbi->opt, DAX_ALWAYS) && S_ISREG(inode->i_mode) && -- 2.41.0