From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 131E1C001B0 for ; Wed, 5 Jul 2023 19:05:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233752AbjGETFv (ORCPT ); Wed, 5 Jul 2023 15:05:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233663AbjGETFS (ORCPT ); Wed, 5 Jul 2023 15:05:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E99E269D; Wed, 5 Jul 2023 12:03: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 706B361659; Wed, 5 Jul 2023 19:03:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 350CEC433C8; Wed, 5 Jul 2023 19:03:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688583828; bh=VKXzwQVEpqzwAn2zr28fV/ocLF/ZTfcqcAZm4WHBcUE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QL+9A8CRS0JtOr1uR0GOj5A9Ne5Uh2DuRDFtt6sauq4vBdl9YbFxhrOnlAvEOBmi8 QiLozocDcw8otXcnlIOYHOY+Q3ufzOEb71eqpT+tR9UrYLp7eM8xwSYt6/7Tu+HN8f dg5ecqw0Ngs18gpqShHvR8YkWrsLa3mUerTocRqPs4bccL28SAzAfSwOapba/4tVPv BaMIrjKJslGoIksb4lLT0oTuTmSw+mhy2isJQWq9vxiDUax9xqGCaFvzOD12/VAoLf TaDyCtArYiYqZV47eh3z16ysFTJbNCWeGnqm2zP2SCkvIpBVNz1lwxlyO8NMMu1GPZ NrlJ746LIvDLw== From: Jeff Layton To: Christian Brauner , Ian Kent Cc: Al Viro , Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, autofs@vger.kernel.org Subject: [PATCH v2 26/92] autofs: convert to ctime accessor functions Date: Wed, 5 Jul 2023 15:00:51 -0400 Message-ID: <20230705190309.579783-24-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 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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. Reviewed-by: Ian Kent Reviewed-by: Jan Kara Signed-off-by: Jeff Layton --- fs/autofs/inode.c | 2 +- fs/autofs/root.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/autofs/inode.c b/fs/autofs/inode.c index affa70360b1f..2b49662ed237 100644 --- a/fs/autofs/inode.c +++ b/fs/autofs/inode.c @@ -370,7 +370,7 @@ struct inode *autofs_get_inode(struct super_block *sb, umode_t mode) inode->i_uid = d_inode(sb->s_root)->i_uid; inode->i_gid = d_inode(sb->s_root)->i_gid; } - inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode); + inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode); inode->i_ino = get_next_ino(); if (S_ISDIR(mode)) { diff --git a/fs/autofs/root.c b/fs/autofs/root.c index 93046c9dc461..512b9a26c63d 100644 --- a/fs/autofs/root.c +++ b/fs/autofs/root.c @@ -600,7 +600,7 @@ static int autofs_dir_symlink(struct mnt_idmap *idmap, p_ino = autofs_dentry_ino(dentry->d_parent); p_ino->count++; - dir->i_mtime = dir->i_ctime = current_time(dir); + dir->i_mtime = inode_set_ctime_current(dir); return 0; } @@ -633,7 +633,7 @@ static int autofs_dir_unlink(struct inode *dir, struct dentry *dentry) d_inode(dentry)->i_size = 0; clear_nlink(d_inode(dentry)); - dir->i_mtime = dir->i_ctime = current_time(dir); + dir->i_mtime = inode_set_ctime_current(dir); spin_lock(&sbi->lookup_lock); __autofs_add_expiring(dentry); @@ -749,7 +749,7 @@ static int autofs_dir_mkdir(struct mnt_idmap *idmap, p_ino = autofs_dentry_ino(dentry->d_parent); p_ino->count++; inc_nlink(dir); - dir->i_mtime = dir->i_ctime = current_time(dir); + dir->i_mtime = inode_set_ctime_current(dir); return 0; } -- 2.41.0