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: 13409229 X-Patchwork-Delegate: bpf@iogearbox.net Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3B90918E29 for ; Wed, 4 Oct 2023 18:55:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HlJs8eUM" 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> Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: bpf@iogearbox.net 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,