]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
fs: refactor file timestamp update logic
authorChristoph Hellwig <hch@lst.de>
Thu, 20 Nov 2025 06:47:22 +0000 (07:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:03:21 +0000 (14:03 +0100)
commiteda80f733fbd5744ce6c1b3b9e9b2daf705dcf0f
tree7eca4ea77389f47dd533216a36eac10379720b89
parent2f62a4e395883ec5a25b6c5a832373459e22f7f3
fs: refactor file timestamp update logic

[ Upstream commit 3cd9a42f1b5e34d3972237cbf8541af60844cbd4 ]

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>
Stable-dep-of: 7f30e7a42371 ("fs: lift the FMODE_NOCMTIME check into file_update_time_flags")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/inode.c