From patchwork Wed Oct 4 18:52:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 148525 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:254a:b0:403:3b70:6f57 with SMTP id hf10csp341752vqb; Wed, 4 Oct 2023 12:00:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG3vrPRn3HYjtvPHXkExXguMiQzZF/OIqlorUyjrDjM5u9l71STCbyOw2n5Bo1TFgrbEPya X-Received: by 2002:a05:6a20:f3a4:b0:15d:e68d:a850 with SMTP id qr36-20020a056a20f3a400b0015de68da850mr3013878pzb.29.1696446011309; Wed, 04 Oct 2023 12:00:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696446011; cv=none; d=google.com; s=arc-20160816; b=ikVjQItqlDulILeqR65Do7nPtv/PUHGVUXq8uqmSFj5OmL/CzoN/7VIzulyS+Q4Ubp Mnv5CXzkOMMt1JJmiDWR2fakBNHvncVsbGaKqB9gLNWEuJvJzYbUB3thWdhXYxgFTQ/A d4I0D9F5u/x5JEsZJYm0tGW0D98lCFGdB+wNIDHz9thQkQw1k6kBhXc2aEVioyj3HC1V cHE91nams0AxfOwu/Oj4fD5LOYO0KbH6wAyN766V2XDBFiYXZHqrqCq7ssV6mQic6QVE PoBgRZUQ9tgqxXG0DaKcYdvYpGeduwpjAHa/RoKgSK+CZaTkfpr/DsKVVX2kn8peo7Qf ipSA== 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:to:from :dkim-signature; bh=BsL/mAgTrQCTN+UBgRTzARCZeKBWD+oe6a/7qQhp33U=; fh=c1hve9LK7bidUltaxotdOOkNtWZ8Drk/KOyPdUWU/OI=; b=RW42/715LahYdNRB+ft1R8+2K42+2hDGzBUapG1OHxeZs30k34wfCfj15uGB0s4p0y eKk7vY7lcDs5g9R+UM6KXDVKVsDK4Io7HXpfcDMiSxVsWBGDYSvCdyqroX19vVD4LlGq HlTJ7OtmMq3WSF4arUsOXTxM9P6gMRSMq/swQb9KFH5alqMdysdUSZwD3xtGKG9B8Oz/ Xkr++JS9B1xmk9qrw1Aba+AVHgNw7/V5BiUbCRAJFHqe4fmNlaZIKZVlUkYnR2FbN/k4 pjW7tDV3ReLFtDbwT+9Pnsmvu2PaI0UcFA2idMQb2zzRiCnHv7GTq4J9hpLSp0e3jMxk FauQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JwtjnuCA; 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 i127-20020a639d85000000b005859eba7939si4144577pgd.20.2023.10.04.12.00.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 12:00:11 -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=JwtjnuCA; 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 1F54180B18BC; Wed, 4 Oct 2023 12:00:10 -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 S244971AbjJDS7Y (ORCPT + 19 others); Wed, 4 Oct 2023 14:59:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245197AbjJDS5d (ORCPT ); Wed, 4 Oct 2023 14:57:33 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1777F19B2; Wed, 4 Oct 2023 11:55:04 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9110AC433CB; Wed, 4 Oct 2023 18:55:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696445704; bh=S8tAZxon6hXRz9ReTd0X25sPxDNyJENVPOCPLJigAL0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=JwtjnuCALLzl4pVn8WtHZ5djoHE7zzymhuew+1h8c4iBqmCTd28c5lltf+jtzVG+A 2kyoeduQxqL22Qt9yczA61L2BNNFop4j4jQTec2w+ey8xdfOdhT8/i5MlHXSCXVYBA inz/uO/ciYyK8U8aul62i+ozajX2HroX6ZGFer9SQ4YEjstfkjlCOZ9XQjuy5zPpXK C6GeihVxFm8GY6LyimSjAswIsfNUJMSWnoWWo06LnT1mf6Ct7KRgZviYWQyK2++BoJ 6RqgfkFFwLgIckOYAsYWbtczKXrQ7gqBVZpOdmXrwwnWI9Q/6xeZNmUTJQiv8TO/+6 eZkpzxRN4bFpw== From: Jeff Layton To: Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 65/89] ramfs: convert to new timestamp accessors Date: Wed, 4 Oct 2023 14:52:50 -0400 Message-ID: <20231004185347.80880-63-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 12:00:10 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778852572636392879 X-GMAIL-MSGID: 1778852572636392879 Convert to using the new inode timestamp accessor functions. Signed-off-by: Jeff Layton --- fs/ramfs/inode.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c index 18e8387cab41..4ac05a9e25bc 100644 --- a/fs/ramfs/inode.c +++ b/fs/ramfs/inode.c @@ -65,7 +65,7 @@ struct inode *ramfs_get_inode(struct super_block *sb, inode->i_mapping->a_ops = &ram_aops; mapping_set_gfp_mask(inode->i_mapping, GFP_HIGHUSER); mapping_set_unevictable(inode->i_mapping); - inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode); + simple_inode_init_ts(inode); switch (mode & S_IFMT) { default: init_special_inode(inode, mode, dev); @@ -105,7 +105,7 @@ ramfs_mknod(struct mnt_idmap *idmap, struct inode *dir, d_instantiate(dentry, inode); dget(dentry); /* Extra count - pin the dentry in core */ error = 0; - dir->i_mtime = inode_set_ctime_current(dir); + inode_set_mtime_to_ts(dir, inode_set_ctime_current(dir)); } return error; } @@ -138,7 +138,8 @@ static int ramfs_symlink(struct mnt_idmap *idmap, struct inode *dir, if (!error) { d_instantiate(dentry, inode); dget(dentry); - dir->i_mtime = inode_set_ctime_current(dir); + inode_set_mtime_to_ts(dir, + inode_set_ctime_current(dir)); } else iput(inode); }