From patchwork Wed Oct 4 18:53:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 13409338 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 10A8EE7C4F1 for ; Wed, 4 Oct 2023 19:01:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245217AbjJDTBD (ORCPT ); Wed, 4 Oct 2023 15:01:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245221AbjJDS7N (ORCPT ); Wed, 4 Oct 2023 14:59:13 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAD461FE4; Wed, 4 Oct 2023 11:55:24 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8569C433C9; Wed, 4 Oct 2023 18:55:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696445724; bh=EO4970jbAZuKMZTl4/2rNPllueWoXzioRkZ7MMwMF6o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HlJs8eUM6lfk7ktqhE291v3xrDfffAHYaeF8iPm+c9muga1RkV44BSTk1vLuGArCu RgO/Yq993tPgfM7L9w0wDuYLn1zlgWsnf7pxyTXmWK4MEZNCrmoPfQrBRFgwgXoaF9 4FAzJpSj4CWJEorRD13r+KQ4klo7Q4XSdtqb977uwDZ+CJAIV/hAm1W9teJQSvrbVI X/2QivHontTzKXxisF4a8CvbP6lpfmYHQDLLspzm9iULj5I98QNuHXz4dNqX8Wjb92 DV4H9tLDg1FAC7T6Crb1CFOLS+8i3lso+jm/1i18XMKPEiklIvaOZhs4/XzLSy6/bE oXX4TPhA+fbVQ== 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 v2 81/89] bpf: convert to new timestamp accessors Date: Wed, 4 Oct 2023 14:53:06 -0400 Message-ID: <20231004185347.80880-79-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 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Convert to using the new inode timestamp accessor functions. 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,