summaryrefslogtreecommitdiffstats
path: root/kernel/bpf/inode.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2023-10-04 14:53:06 -0400
committerChristian Brauner <brauner@kernel.org>2023-10-18 14:08:30 +0200
commit1bc628a756d93a7bed2f80914b15821bb9a4369c (patch)
tree0ade6c2274eba788c9928e9f6c302031d6a47c9d /kernel/bpf/inode.c
parentd162a3cf6ee1a64417e11693c1410d79878c9917 (diff)
downloadlinux-stable-1bc628a756d93a7bed2f80914b15821bb9a4369c.tar.gz
linux-stable-1bc628a756d93a7bed2f80914b15821bb9a4369c.tar.bz2
linux-stable-1bc628a756d93a7bed2f80914b15821bb9a4369c.zip
bpf: convert to new timestamp accessors
Convert to using the new inode timestamp accessor functions. Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://lore.kernel.org/r/20231004185347.80880-79-jlayton@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'kernel/bpf/inode.c')
-rw-r--r--kernel/bpf/inode.c5
1 files 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,