From patchwork Wed Oct 4 18:52:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 13409301 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7777E7C4EE for ; Wed, 4 Oct 2023 18:54:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 413858D009C; Wed, 4 Oct 2023 14:54:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3C3F18D0002; Wed, 4 Oct 2023 14:54:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2B2F18D009C; Wed, 4 Oct 2023 14:54:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 1F99F8D0002 for ; Wed, 4 Oct 2023 14:54:43 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id E68B71C9F1F for ; Wed, 4 Oct 2023 18:54:42 +0000 (UTC) X-FDA: 81308680404.14.0FAB3AA Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf07.hostedemail.com (Postfix) with ESMTP id 3AB494001D for ; Wed, 4 Oct 2023 18:54:40 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=JjCLMHa9; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf07.hostedemail.com: domain of jlayton@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=jlayton@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1696445681; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=V6+qe6AGparTSOjauaKonsVYwrcp/k0IaLgG1CC3Ipw=; b=djkWvDoQvGKAI618y17dbY16pdltNcUmCgi46gLfDihaDa5d/xMsp24x2jVZNsaaa5W+rN eVoA0i05/0KALuvuy3jSJzic44lHqZjR9iz9V0eTVe73meQlyPeIhNL1Qd8Hqk8R923POI 53we3e2Y3gakEPs6HeSJbE8WA52KgXQ= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=JjCLMHa9; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf07.hostedemail.com: domain of jlayton@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=jlayton@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1696445681; a=rsa-sha256; cv=none; b=VHbAdqDpNWOMmrBLjuz1taZTffGYOzi9oYxMgPOq9BldmwHYthbB9B+VdZiP4ivTJz68tB JA3dU5kQ2ehbnGJ0T4kKyRgC6EQy8541fj1eNcmM1Xyu3QWI89hEyf1RVt3rJ8WE0vqH+y SWN+r2ZHCMOcH4HRhicqNHbcCSWVlnk= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id C23C9B81FE5; Wed, 4 Oct 2023 18:54:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E2CDC433C8; Wed, 4 Oct 2023 18:54:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696445679; bh=p1Dmt9XjnzAIX2jMetI3FBJUlMhdUAq23wbUyqvehig=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JjCLMHa9gGt1lQ2XglXkWIOzENaZqGQds9dyNJRseHF7EiGAA4OQYoi85LQLmjerE W8FBwPDioyvpOxPK4SsvWmfmOJFhaQ/auThs4fF5EMh6fvA/N06QRW/BZHoaTCb8qR JfGxyvUL5iiEeiP/BQzzmnpOfMwLqK9PQRk1kwhs3++i33ChgTGZAL4lmby1YURqqO 5MMygpwKgaGff/zh75Jj7sUd5GeLsGG0j6xslMdzq+jnE/+DMDf+QxMvEe23VwhezG w+VDO5JZfF6S7M421QsoVPWflcKapd4cnqFBWvHd/PcCA/EJiIq+aMcOY0aLgROZjM myDH5ZPPCUwxg== From: Jeff Layton To: Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org Subject: [PATCH v2 45/89] hugetlbfs: convert to new timestamp accessors Date: Wed, 4 Oct 2023 14:52:30 -0400 Message-ID: <20231004185347.80880-43-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-Rspam-User: X-Stat-Signature: ajnqb1mhu4wgr7wngdnxazc9qeqq53bx X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 3AB494001D X-HE-Tag: 1696445680-696442 X-HE-Meta: U2FsdGVkX1+0llg2OfTcDU3GOe9etjRtTmZ/j8kFe7xZLZIW7UG7QNfel7kofG00WZJ2iEzM3wqNYHatgYxo2pRH1AjKgRokafeFtQexmkbrKJnD3LdCeLXMK7PF0avxAdfI3Kdjf1TJowt1+q/pdh0ePJYyAUjW+lyFvkwamKmQtlE0GWwX2P5rn+Z6gDyVWU8NdeQroZSRwBERHHfoXFCWTHDqDIqoFSHgsEYI+gEvnYLs58mK3dTUH7Fe9jJHEar5fbCfdFn5yj5xZhRZx3MzEUoWG6HzP7epg2okn3LnVTvQBdiRKuAgFpPn+MFpO5hP/UdqYA08LDQ4rAVC2WqzF9rilpz25BthixodPlNyV9pP4We6pwV5chv+0w8qXs8ZZge06ueCpbPdj9p2aWWI770jxLYfAntVzzZKVSHYa5mUHNVdYiMk48ulOwiLxf9tgtAB9uNJs2nHwYX6BCv1NKkBZFQYkpHWVCyrJojOe3sCAfXgEOQSouVTE0i0f+9Uxky1G7dVNh3F3/Yimv4RWZ8FFgRTCUivVEwsa3t3GnT8yOzPI8Dtdhy7FA3llwqJtXLUCRNJRBtPsiM0fwKAPIxLRyhPOLEDy8cnzYJcOTuoWEIT918moyHXiZGjUDO4zm3RDvMz3IHu9nFSYjjXDjYxKrIpvjmLaBGREKJmTlUO+y5uDxExuhzR1doXmEV+IZ4/187bTRPra2dM1CDI1go4F2bGJCYRVHzB7VE00CeN6NRHn7Kmq9+vGpWHoLsntTpHYI739bdhiY+XLLnGigT9arOkimklneX8LZ+MSzl3reA9oeoXnLX9D5eshVXcfx1+SKRcVF1N3ZZA8IMT7+Gm8QceT1ktwMMELynG9IXO1N14vYZA4WN5/V6/N2JmJcpldjdNPdacQJ8f/A9tMAlEAN0QsYJit0/YvAowRnDPnf625Sbssh+YgdN42oevmE+yLOmr4m+Pknv sAsPw4+O 0UMfxPFkp4VKyZfaJbV/LxMipENecu9KmqLqNRGYS5MQ7yTVwRMrHUN2k76QfkWbg3H+EH+G7uxFTk7gtMYdFfbiSQyrrY6vPvjvG/nQxYCD8a4fqrGs1JJpqgeiaW2iQuD4UI41jNYXJUQJq3bdhOwUwPhbJXNx33JU2XE35pWYgkS/+ESg7dZijKKWMdk71x6gvi5kY7wm9NmqE2eizkT/GKHECNDrFtBRS2TQaY+zZwUfHrNm5oVFxCQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Convert to using the new inode timestamp accessor functions. Signed-off-by: Jeff Layton --- fs/hugetlbfs/inode.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index 926d01c493fb..ebb3506eeeee 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c @@ -981,7 +981,7 @@ static struct inode *hugetlbfs_get_root(struct super_block *sb, inode->i_mode = S_IFDIR | ctx->mode; inode->i_uid = ctx->uid; inode->i_gid = ctx->gid; - inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode); + simple_inode_init_ts(inode); inode->i_op = &hugetlbfs_dir_inode_operations; inode->i_fop = &simple_dir_operations; /* directory inodes start off with i_nlink == 2 (for "." entry) */ @@ -1025,7 +1025,7 @@ static struct inode *hugetlbfs_get_inode(struct super_block *sb, lockdep_set_class(&inode->i_mapping->i_mmap_rwsem, &hugetlbfs_i_mmap_rwsem_key); inode->i_mapping->a_ops = &hugetlbfs_aops; - inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode); + simple_inode_init_ts(inode); inode->i_mapping->private_data = resv_map; info->seals = F_SEAL_SEAL; switch (mode & S_IFMT) { @@ -1068,7 +1068,7 @@ static int hugetlbfs_mknod(struct mnt_idmap *idmap, struct inode *dir, inode = hugetlbfs_get_inode(dir->i_sb, dir, mode, dev); if (!inode) return -ENOSPC; - dir->i_mtime = inode_set_ctime_current(dir); + inode_set_mtime_to_ts(dir, inode_set_ctime_current(dir)); d_instantiate(dentry, inode); dget(dentry);/* Extra count - pin the dentry in core */ return 0; @@ -1100,7 +1100,7 @@ static int hugetlbfs_tmpfile(struct mnt_idmap *idmap, inode = hugetlbfs_get_inode(dir->i_sb, dir, mode | S_IFREG, 0); if (!inode) return -ENOSPC; - dir->i_mtime = inode_set_ctime_current(dir); + inode_set_mtime_to_ts(dir, inode_set_ctime_current(dir)); d_tmpfile(file, inode); return finish_open_simple(file, 0); } @@ -1122,7 +1122,7 @@ static int hugetlbfs_symlink(struct mnt_idmap *idmap, } else iput(inode); } - dir->i_mtime = inode_set_ctime_current(dir); + inode_set_mtime_to_ts(dir, inode_set_ctime_current(dir)); return error; }