fs: new accessor methods for atime and mtime
authorJeff Layton <jlayton@kernel.org>
Wed, 4 Oct 2023 18:52:37 +0000 (14:52 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Jan 2024 14:19:40 +0000 (15:19 +0100)
commit5b5599a7eee5e6101c6ae738682331bc6299a54d
treed6183b68703542cb43cb7cf8cf2a94062d560883
parent861eaba7ca6c6f96537cd14d16503426b995dc1d
fs: new accessor methods for atime and mtime

[ Upstream commit 077c212f0344ae4198b2b51af128a94b614ccdf4 ]

Recently, we converted the ctime accesses in the kernel to use new
accessor functions. Linus recently pointed out though that if we add
accessors for the atime and mtime, then that would allow us to
seamlessly change how these timestamps are stored in the inode.

Add new accessor functions for the atime and mtime that mirror the
accessors for the ctime.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://lore.kernel.org/r/20231004185239.80830-1-jlayton@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
Stable-dep-of: 01fe654f78fd ("fs: cifs: Fix atime update check")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/libfs.c
include/linux/fs.h