]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
fs: refactor file timestamp update logic
authorChristoph Hellwig <hch@lst.de>
Thu, 20 Nov 2025 06:47:22 +0000 (07:47 +0100)
committerChristian Brauner <brauner@kernel.org>
Wed, 26 Nov 2025 13:50:10 +0000 (14:50 +0100)
commit3cd9a42f1b5e34d3972237cbf8541af60844cbd4
tree32ee79c38a61fdda6e8150bdc57b241eaac41449
parent54ca9e913e22e364292a484783efc4fcdb6fdc51
fs: refactor file timestamp update logic

Currently the two high-level APIs use two helper functions to implement
almost all of the logic.  Refactor the two helpers and the common logic
into a new file_update_time_flags routine that gets the iocb flags or
0 in case of file_update_time passed so that the entire logic is
contained in a single function and can be easily understood and modified.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20251120064859.2911749-2-hch@lst.de
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/inode.c