Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9571890rwd; Wed, 21 Jun 2023 09:02:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5O0I91BTotqMTLMXjHA2HAi0b/fwU0vjS0TNMvO2J8M8CY05Ap/wwxxpMqF1cXKC/GQixr X-Received: by 2002:a17:90a:bb09:b0:25e:d6f0:f0a5 with SMTP id u9-20020a17090abb0900b0025ed6f0f0a5mr16834776pjr.19.1687363345672; Wed, 21 Jun 2023 09:02:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687363345; cv=none; d=google.com; s=arc-20160816; b=pWTBYBYfwqbWz0161OzSSa5lpTqMPnz3SddB9jUw2TWwOiy7p0Fi0NeH7RbQ4BLp9n /NahGvTrJnK4HDV3J7pBjZCSqk9VveS7GE9mh2KvwC4/2xlpXrO83sWHS+peoFROJPFI C4uS5zqhXFWSiN/DyOFdS3XRgzjezsYKPSCVSrLnKdPY8r7hQCXfpNLmFIfizdAlp7O9 PODZhcOdFPlAys302+5Ao1A7eUBLYnpVEXcyZ5y0SZtgmSG2PVZDXyZc4Xq7nNb3DpY6 RjV6qAS0wzVI0b7fPG590eeLTwJfJvrERpgJgpkDlCoJMlNl7bg19rFzBJnrb/BeZ1ub eqaQ== 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=4ICYar483VpAW29FlEPj983E2KDlgggtaMdI3lrFYLE=; b=UGleN/Z8qVFYUmA07gKT0Wh/jGFNj7VJVnI1y21SofpKrZtAIVgA2I9ksp27pgRxWE 9vhxME7k1uzf9PD5CvYrNoqxvj0D1rl5Hb1TmHX6MKlqpc1w56g7UOaHu2cVn9H/7xuP 0JAPhMk1+Lpywor9aVrJA4B90iZ6OiLNRk+7F0RuSBnouj5iXKvD2eL6fpAWBNFozhvD L9ZSOdSsdM/jr5ymUZQ4Rt1VGx1WXU65H0X+sts+KCIb7dLz/y+M+Pn6FvWYPjk05sza fugJBqhqOM8Xv1+Xp5CC5/mP5uP/aw49cBxCrAjO7gBjzgtbw4wVLDc/7P41AJ+aziSx nAig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RT8HOh2a; 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 t11-20020a17090a3b4b00b0025e7ff46234si11739319pjf.57.2023.06.21.09.02.00; Wed, 21 Jun 2023 09:02:25 -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=RT8HOh2a; 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 S233058AbjFUO4b (ORCPT + 99 others); Wed, 21 Jun 2023 10:56:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232785AbjFUOyp (ORCPT ); Wed, 21 Jun 2023 10:54:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F093435A6; Wed, 21 Jun 2023 07:50:20 -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 2D3F8615A6; Wed, 21 Jun 2023 14:49:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8695C433C9; Wed, 21 Jun 2023 14:49:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687358952; bh=1rG9x7ERKlXPL28fdmfGNObNC3MxW/4isCj9mvzuWg0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RT8HOh2ac+RrlE5gqK4Rn6tQ61Z4LxN7negTXG9UJpCXXm44qb5mZouTQhdP4AjWX eLdGf6xXRIgGvKQKKvTmaVMaEUpsdDJHx+mKlHr8fidNcZ23duMQiALp+rYRUInxyV ttop9om2eqSR6JlxvxzJ4BTigVr8xEQcd/OQHtEdAiAq9n1zD4hdTLaLHGtqebKosD uPjz4hsfISSRoF8SkNBaf4mvY98OSNy886txs75Foo9c305QWT73m3iqev/EpgMV2Q gEEce0+WNhKrdDw9ji3Txx1gYqaXL+82uCWLh0MFoRwxMjeAsqvjFsbD2fYdMrptTr qwFg6uNQ7vT7g== From: Jeff Layton To: Christian Brauner , Luis Chamberlain , Kees Cook , Iurii Zaikin Cc: Al Viro , Jan Kara , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH 55/79] proc: switch to new ctime accessors Date: Wed, 21 Jun 2023 10:46:08 -0400 Message-ID: <20230621144735.55953-54-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/proc/base.c | 2 +- fs/proc/inode.c | 2 +- fs/proc/proc_sysctl.c | 2 +- fs/proc/self.c | 2 +- fs/proc/thread_self.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/proc/base.c b/fs/proc/base.c index 05452c3b9872..354f7f9ad05b 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -1902,7 +1902,7 @@ struct inode *proc_pid_make_inode(struct super_block *sb, ei = PROC_I(inode); inode->i_mode = mode; inode->i_ino = get_next_ino(); - inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode); + inode->i_mtime = inode->i_atime = inode_ctime_set_current(inode); inode->i_op = &proc_def_inode_operations; /* diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 67b09a1d9433..61f4fc0a6261 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c @@ -660,7 +660,7 @@ struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de) inode->i_private = de->data; inode->i_ino = de->low_ino; - inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode); + inode->i_mtime = inode->i_atime = inode_ctime_set_current(inode); PROC_I(inode)->pde = de; if (is_empty_pde(de)) { make_empty_dir_inode(inode); diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index 4e5488975415..abb7e524b28b 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -463,7 +463,7 @@ static struct inode *proc_sys_make_inode(struct super_block *sb, head->count++; spin_unlock(&sysctl_lock); - inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode); + inode->i_mtime = inode->i_atime = inode_ctime_set_current(inode); inode->i_mode = table->mode; if (!S_ISDIR(table->mode)) { inode->i_mode |= S_IFREG; diff --git a/fs/proc/self.c b/fs/proc/self.c index 72cd69bcaf4a..bb5dbdd30627 100644 --- a/fs/proc/self.c +++ b/fs/proc/self.c @@ -46,7 +46,7 @@ int proc_setup_self(struct super_block *s) struct inode *inode = new_inode(s); if (inode) { inode->i_ino = self_inum; - inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode); + inode->i_mtime = inode->i_atime = inode_ctime_set_current(inode); inode->i_mode = S_IFLNK | S_IRWXUGO; inode->i_uid = GLOBAL_ROOT_UID; inode->i_gid = GLOBAL_ROOT_GID; diff --git a/fs/proc/thread_self.c b/fs/proc/thread_self.c index a553273fbd41..373680bd0635 100644 --- a/fs/proc/thread_self.c +++ b/fs/proc/thread_self.c @@ -46,7 +46,7 @@ int proc_setup_thread_self(struct super_block *s) struct inode *inode = new_inode(s); if (inode) { inode->i_ino = thread_self_inum; - inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode); + inode->i_mtime = inode->i_atime = inode_ctime_set_current(inode); inode->i_mode = S_IFLNK | S_IRWXUGO; inode->i_uid = GLOBAL_ROOT_UID; inode->i_gid = GLOBAL_ROOT_GID; -- 2.41.0