Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3145267rdh; Thu, 28 Sep 2023 04:13:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IElVGzulo+dXrQe01jP38A9cgjkscZHRPNKfkWgUUeCC8AkGxJm3MCa0u9AVgheIgp+Ze+7 X-Received: by 2002:a05:6358:7252:b0:134:e549:50d6 with SMTP id i18-20020a056358725200b00134e54950d6mr1065588rwa.10.1695899606549; Thu, 28 Sep 2023 04:13:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695899606; cv=none; d=google.com; s=arc-20160816; b=YyTPIh4cRW2NpuNVXe5KtKeAiry/ss57xdmwyGv+TKIooeFDVP88FmuC0wcJlsYsXC hC2Kgttbk1azDJsBBu60Q2oGr+SM/gtdRz6FhsE/Udvj2pssZEpsXsgR6Nkt5BuKf00/ VgeUxdU/DBDwXM0OwlY4Hc4vj1dmo6aEgzSgBiI3IeeoNjMPO8jwe3dUpnAb4tAI2/om iglUazNFPHi7bUZaWMVIWAv+wf3o67cwIR1s6EGLtC9ifWGvHbqI5tF3tL3N35latInX NnGlSyZrBnArsx1c8/hmLfaEjR+UWVE7ei66jSJv0luHhOm42h3iRArSe5N8qNXR1LZf 4now== 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=mv8IuoczD8+D4W/8RWeO9KR6l1WixCMirVn7db+ONRs=; fh=YcvKTfjdELTIgtVvxDx+GI7Jag3KQiPyLLfYV96J/gA=; b=FJOtP1ht9m/tT8g28tG5rEIT+Rf9DQdYKJOx7wfhv6cxAqHVx3hLQi71pGUjn4B+L+ neW77HyjMwCay4/EkodEEF+PQtSGU+A86uYqDtmnFXeOCHlrzxZd0PHxho12x5ru8xWW sX9jXgaVMzETEChY6joVx/D97H3+2bLmJ9UjRlkadPJk+tTYR+QqVsk7AW5W9O8xGtSM y59Bx8xBeysqx5lgWYT/QX8gRM2PBqBGYcGtCTLsy45mP3Vrk9hKBtfQIOfDP6umwghm awC0qQJfr3FctUIuDBm0J3n/SyNmeC5gLq+iBKfO/VbJb+N+deqpcsNH0bsPkWXOy3RW GOow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Lk6lU76r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id n13-20020a65488d000000b005777bea0b6asi18171728pgs.859.2023.09.28.04.13.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 04:13:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Lk6lU76r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 7CB858066277; Thu, 28 Sep 2023 04:09:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231767AbjI1LH7 (ORCPT + 99 others); Thu, 28 Sep 2023 07:07:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232214AbjI1LGJ (ORCPT ); Thu, 28 Sep 2023 07:06:09 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 280C7172C; Thu, 28 Sep 2023 04:05:05 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66E2DC433C7; Thu, 28 Sep 2023 11:05:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695899104; bh=WdhKVeDvEbKnuqVE8JioBf7/XuFh9c0DQ7/RiYq45FU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Lk6lU76rtis34gPcawFKYvC3t92lkvckjaFjUIluPI3HFE3OLVD5JnhI3R/rVMN7r F8czyTGJsP3qg3qvVwQLSTHLuSyrC0haq2UAKJra1gJAoQFpr99CN3v3mhZ6xsognJ yozcfjf26Nea0TfCxH8Vc/BNVQHQBJKESwH+U2q01uSM0hBTcrS7QUbw9WTVPm8yuG ex+WxCbn/K5N0oH3t1IZtrwihqdPcZRS3iWr07rRton6NuqSfucu3Sy2htGrrOwNpi x6tTG961YMV7gvUwsQo6MW1Xu0Ba7256DKzhqrfuFgVIH9idX1Q+JtwAwtDVxbGYs3 j5W14p/tJlYsg== 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 44/87] fs/hugetlbfs: convert to new inode {a,m}time accessors Date: Thu, 28 Sep 2023 07:02:53 -0400 Message-ID: <20230928110413.33032-43-jlayton@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230928110413.33032-1-jlayton@kernel.org> References: <20230928110300.32891-1-jlayton@kernel.org> <20230928110413.33032-1-jlayton@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email 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 (pete.vger.email [0.0.0.0]); Thu, 28 Sep 2023 04:09:10 -0700 (PDT) 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 316c4cebd3f3..da217eaba102 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c @@ -980,7 +980,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) */ @@ -1024,7 +1024,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) { @@ -1067,7 +1067,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; @@ -1099,7 +1099,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); } @@ -1121,7 +1121,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; } -- 2.41.0