From patchwork Thu Sep 28 11:03:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 13402783 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 1C511E732C4 for ; Thu, 28 Sep 2023 11:22:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232164AbjI1LWh (ORCPT ); Thu, 28 Sep 2023 07:22:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231868AbjI1LWV (ORCPT ); Thu, 28 Sep 2023 07:22:21 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C513730C2; Thu, 28 Sep 2023 04:05:50 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1EAB7C433C9; Thu, 28 Sep 2023 11:05:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695899148; bh=/OzpYTerhvIxS1I7NYNGCj7AfHI9vs2n0+hMzd5zjnw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DuP/wv+atLxYolVz3TsVy7tiJ9223Z4WvylhKVREmBxsCU+CN1xVxwsq/2PSJlKEj 0SeFCWDbJDEV2ld8iYUItZxaNPQKwnCASz+Napuig4CEsneZ1BjStWwJ4HAb+OA7cy SC9iG6X9UH80RRDJ1thj83wDn1k8f+8TcsKMLv9fjOR20LSA6H5T9oflMf7xc2GvJF O+eaXZLTN+H3mhRL9ttNl/zo0SzNSOVAPN7PO6IE8z90ITg/kKteuIEqbh6j7HpWoT JbjgE6gSfyISnBqy3vYQBrzvpMobxvgl/MqrGENhf1ZBiEdRbysBwAoi7vgbpwg+Lw 0YxsoKatJ28nA== From: Jeff Layton To: Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , bpf@vger.kernel.org Subject: [PATCH 79/87] kernel/bpf: convert to new inode {a,m}time accessors Date: Thu, 28 Sep 2023 07:03:28 -0400 Message-ID: <20230928110413.33032-78-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 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Signed-off-by: Jeff Layton --- kernel/bpf/inode.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/bpf/inode.c b/kernel/bpf/inode.c index 99d0625b6c82..1aafb2ff2e95 100644 --- a/kernel/bpf/inode.c +++ b/kernel/bpf/inode.c @@ -118,8 +118,7 @@ static struct inode *bpf_get_inode(struct super_block *sb, return ERR_PTR(-ENOSPC); inode->i_ino = get_next_ino(); - inode->i_atime = inode_set_ctime_current(inode); - inode->i_mtime = inode->i_atime; + simple_inode_init_ts(inode); inode_init_owner(&nop_mnt_idmap, inode, dir, mode); @@ -147,7 +146,7 @@ static void bpf_dentry_finalize(struct dentry *dentry, struct inode *inode, 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)); } static int bpf_mkdir(struct mnt_idmap *idmap, struct inode *dir,