From patchwork Wed Oct 4 18:52:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 148484 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:254a:b0:403:3b70:6f57 with SMTP id hf10csp340123vqb; Wed, 4 Oct 2023 11:56:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHY/mAHhe5TN+VnuMV5/rRKZlhK6IDOwarnQ9o7KaDj8mcHN64m3hUfIKqPhfBDwGS+RgrP X-Received: by 2002:a17:902:f812:b0:1c6:1ddf:5c3b with SMTP id ix18-20020a170902f81200b001c61ddf5c3bmr2936685plb.28.1696445797699; Wed, 04 Oct 2023 11:56:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696445797; cv=none; d=google.com; s=arc-20160816; b=ZEgnukhxOAT3GxBd6jghyKUr2D45W5yuz68db9AUXMRIa3fucP1bJJONFWIgkpKvdm OeuZlP7WoFDNM4xcXv68ziOJWYkP3yi5+wnQDtKnurY863dqR69YF0YjenVXpUo4El5a KTBMqluvsx8Gdpn0F3rem9Lk9lH/GZrEdS/qYBZDodNOOYS0+8gl4ZyMIGba0MZCqOPw 5mMuddi49+5pgYeb/lipaTFAISXGr1+mTIF5wE5CITgCXg/p89B3ISr0ZW7L9BQRMf9a kB04jaxgYt1i1Iqhpuv0fB3N2xROfGFxX4s9isr65/vkJRO2CgjNZ4vqBw1I3VMW6qvm /98g== 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=ljrOf95K3lMJ6sM56rwczoIDF5jerBsErHMpQdHe7ME=; fh=8sRj4pXGeWd3I48ZGssU2MRGGxH8f7IpW7BNWZdmlJ0=; b=xu/yjdUt+zWH5VDp+QHJVAduHlSjkT5qjPNYbIprBVoeX6sIL6VgHuHsdl6s6MdAVY YW8nErdMHXDkSCq+gX0Sqpm76dOTh/wGbVE1Ysshd3A1ez/qgVxzDyxAHbn+IfQuGxhd pMLNCPXOm+jf3maVHr1VWf3/wfFUyda3QupwVXYIOIIhPOJvzMBzpWDuV7W+4oL6Hzb0 i2GY1ZMZvK8e9f4wElTNwcRdYh6WN+Wt+inYIMJ4jsJLtBjI6OceqlBApQno+UK0Na1E GONSHAr/QCiI+WYGtGC0MrZcQX4UoGIJBIIMYg43r8wpw1hhKw62oMKfmSEW8j9ouGOZ yuyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Xhj1Ad6i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id x13-20020a170902ec8d00b0019c354055d0si4500630plg.304.2023.10.04.11.56.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 11:56:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Xhj1Ad6i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 46D6D80725D3; Wed, 4 Oct 2023 11:55:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244949AbjJDSzb (ORCPT + 19 others); Wed, 4 Oct 2023 14:55:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244590AbjJDSyi (ORCPT ); Wed, 4 Oct 2023 14:54:38 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBDCC116; Wed, 4 Oct 2023 11:54:07 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02E93C433CB; Wed, 4 Oct 2023 18:54:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696445647; bh=KQeY8erJHarU6ZVyZ8B2z5f4xlYqdNPN1UGFBoaYrPM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xhj1Ad6izXuGGHYPS9yHSI5iMoKyd+GjFWNN0VYIdRE+nIurlEgOxXt7C6oqYXTOr NApc2qN3QL87evLjHwSUiWgWzS9Pz6iQ9HpQ6kfprWPl6s5d2NmK7kfGuEbBeJYhWl cQa+te9hcBI2DyO535CWvycQ6g+ARcMRf927vKxnJzml3uh75U0yJ4IQcSS9ZVTh17 dwVzOHIa/fisFCCPLEFpCT3DxsL3CQkT9eoQ+etmF/f1Z+v2fWqqFCQOqHeuW4DZfl piFw5Ab48zYajfRl5wbam7R/sx/TsVnyvSOst37uWix1OvcvfqLklNnbip8izGbOMc OjFKjMxwh7j1A== From: Jeff Layton To: Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: autofs@vger.kernel.org Subject: [PATCH v2 19/89] autofs: convert to new timestamp accessors Date: Wed, 4 Oct 2023 14:52:04 -0400 Message-ID: <20231004185347.80880-17-jlayton@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231004185347.80880-1-jlayton@kernel.org> References: <20231004185221.80802-1-jlayton@kernel.org> <20231004185347.80880-1-jlayton@kernel.org> MIME-Version: 1.0 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 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 04 Oct 2023 11:55:42 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778852348697675844 X-GMAIL-MSGID: 1778852348697675844 Convert to using the new inode timestamp accessor functions. 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 6d2e01c9057d..77b1b90b5d11 100644 --- a/fs/autofs/inode.c +++ b/fs/autofs/inode.c @@ -457,7 +457,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_set_ctime_current(inode); + simple_inode_init_ts(inode); inode->i_ino = get_next_ino(); if (S_ISDIR(mode)) { diff --git a/fs/autofs/root.c b/fs/autofs/root.c index 512b9a26c63d..530d18827e35 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 = inode_set_ctime_current(dir); + inode_set_mtime_to_ts(dir, 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 = inode_set_ctime_current(dir); + inode_set_mtime_to_ts(dir, 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 = inode_set_ctime_current(dir); + inode_set_mtime_to_ts(dir, inode_set_ctime_current(dir)); return 0; }