Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9515029rwd; Wed, 21 Jun 2023 08:21:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5g2X/uusWV5RfSkyAF8hIl4bIhd0g44NsdE1J2h9G60bXwcsl5F2WOKSqziH6FLAuNJRps X-Received: by 2002:a05:6870:5ab2:b0:1a6:98ca:4343 with SMTP id dt50-20020a0568705ab200b001a698ca4343mr8228520oab.1.1687360866829; Wed, 21 Jun 2023 08:21:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687360866; cv=none; d=google.com; s=arc-20160816; b=K9UX9ZkkmIbRabaptCS1beM+D/olVcLVJfuSyEriVJkvGXnKckyFbZegjOJhmMie5W baxEQO3ASuGQO5L+ypfR+Sgx6pefF5JrgBVCBzSIgURuplXeHGeiQ4+x+OVOoWttnPY7 AozeeACXUCRrwfzwNrzufgB/WLjJ9ii6Li2jPIo09esCQe6sC7XEH1vsq58oSJrVUP3g zKWaWXZseP3pPVxuouWxZpZ/nhCSXMm6j2kMtTDk8JoIDEqiqENrCxKoehgesUC5kxTX houz3D1X58d31W01rNO3WBTSvT4I0UeLK+ciuUE6ctWZDzn06riUO27njIEFpOo60Reh ibRQ== 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=mfxmr3tq3asWkad3A6W2eWoDsLLc3QDZevPjg+tC8IU=; b=SF2zDz2BE73vYw8sMuAVTC55ABGroa3fyGqGOOUwuAi+I8FIAIQvE8YbxWjD7t4/PY vnl4fvoCYImlHl/VZSGK0P0fWJKruhnP+EkHH6Lenqc3YBh6oMfJVirOxY9pAMSVxd2a MqeUynjZGkaSQXOHqUgJLZNAy3fq1OGFhtxcH0EnEwQRIhqbAXzWGEE/HydSXs4YreOR cFKcuh+vmXcEdBni7R6LDseVuMhBnkWD1LMrraBXGD8ZBEut9f6sOzbVDj4zozVcac6A wMBn3//8ZSepzp1wi2K7bvYM5gMyz/dhuPGBbikRathAZKDb6S+xVpBl0SX7bS8IU1Vh AM1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uxs4ILcj; 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 s2-20020a17090a13c200b00253326d4e5bsi4350069pjf.57.2023.06.21.08.20.54; Wed, 21 Jun 2023 08:21:06 -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=uxs4ILcj; 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 S232380AbjFUOw6 (ORCPT + 99 others); Wed, 21 Jun 2023 10:52:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232397AbjFUOv5 (ORCPT ); Wed, 21 Jun 2023 10:51:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E542F1FD4 for ; Wed, 21 Jun 2023 07:49:06 -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 BE86E6159A for ; Wed, 21 Jun 2023 14:49:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D0AFC433C8; Wed, 21 Jun 2023 14:49:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687358946; bh=w0GRo5owbosOIL5IOwRPzqacdqpxHdKA8CfKDsWGpQQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uxs4ILcjp4N2ppOX8asPwYn830WjQU9Lbf/fB7KjgK5wnPYMoVBac0vGJNnyIz/r1 oIoWqVhtgSfZgo0GiceGIDjeJEx1tG6Rk/GQmIzVVG6Zyit0v5uGPe9Hmqm9oAm35j YFm+QXkwHpqJZXyt+/hgjwni0zmTTvcRkc8r5Pvx5ZJ68IfLlGmH2XLp63fe1X/WSx +0Yrp3gVDK5Uwbdh2FNWN3vG9jVEEvZQs6U5GdA+xhPOfBKtJHT2g6d6xU8ffV8Xc5 dh4qXmHXVxShHTqR8oofalh+t08v0XK8JYbjN9d8eCjGfvCHUvAf+OUyyyKaJ8bhd9 Q9T0BAQmVi1WQ== From: Jeff Layton To: Christian Brauner , Bob Copeland Cc: Al Viro , Jan Kara , linux-karma-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH 51/79] omfs: switch to new ctime accessors Date: Wed, 21 Jun 2023 10:46:04 -0400 Message-ID: <20230621144735.55953-50-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=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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/omfs/dir.c | 4 ++-- fs/omfs/inode.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/omfs/dir.c b/fs/omfs/dir.c index 82cf7e9a665f..9b302b859335 100644 --- a/fs/omfs/dir.c +++ b/fs/omfs/dir.c @@ -143,7 +143,7 @@ static int omfs_add_link(struct dentry *dentry, struct inode *inode) mark_buffer_dirty(bh); brelse(bh); - dir->i_ctime = current_time(dir); + inode_ctime_set_current(dir); /* mark affected inodes dirty to rebuild checksums */ mark_inode_dirty(dir); @@ -399,7 +399,7 @@ static int omfs_rename(struct mnt_idmap *idmap, struct inode *old_dir, if (err) goto out; - old_inode->i_ctime = current_time(old_inode); + inode_ctime_set_current(old_inode); mark_inode_dirty(old_inode); out: return err; diff --git a/fs/omfs/inode.c b/fs/omfs/inode.c index c4c79e07efc7..d420e5a53de3 100644 --- a/fs/omfs/inode.c +++ b/fs/omfs/inode.c @@ -51,7 +51,7 @@ struct inode *omfs_new_inode(struct inode *dir, umode_t mode) inode_init_owner(&nop_mnt_idmap, inode, NULL, mode); inode->i_mapping->a_ops = &omfs_aops; - inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode); + inode->i_atime = inode->i_mtime = inode_ctime_set_current(inode); switch (mode & S_IFMT) { case S_IFDIR: inode->i_op = &omfs_dir_inops; @@ -134,8 +134,8 @@ static int __omfs_write_inode(struct inode *inode, int wait) oi->i_head.h_magic = OMFS_IMAGIC; oi->i_size = cpu_to_be64(inode->i_size); - ctime = inode->i_ctime.tv_sec * 1000LL + - ((inode->i_ctime.tv_nsec + 999)/1000); + ctime = inode_ctime_peek(inode).tv_sec * 1000LL + + ((inode_ctime_peek(inode).tv_nsec + 999)/1000); oi->i_ctime = cpu_to_be64(ctime); omfs_update_checksums(oi); @@ -232,10 +232,10 @@ struct inode *omfs_iget(struct super_block *sb, ino_t ino) inode->i_atime.tv_sec = ctime; inode->i_mtime.tv_sec = ctime; - inode->i_ctime.tv_sec = ctime; + inode_ctime_set_sec(inode, ctime); inode->i_atime.tv_nsec = nsecs; inode->i_mtime.tv_nsec = nsecs; - inode->i_ctime.tv_nsec = nsecs; + inode_ctime_set_nsec(inode, nsecs); inode->i_mapping->a_ops = &omfs_aops; -- 2.41.0