]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
fs: lift the FMODE_NOCMTIME check into file_update_time_flags
authorChristoph Hellwig <hch@lst.de>
Thu, 20 Nov 2025 06:47:23 +0000 (07:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:03:21 +0000 (14:03 +0100)
commite901d77f8994362a249714804d47560a92dff911
tree77ef6c3098b93567b11c995a53e16c00a4bf20f0
parenteda80f733fbd5744ce6c1b3b9e9b2daf705dcf0f
fs: lift the FMODE_NOCMTIME check into file_update_time_flags

[ Upstream commit 7f30e7a42371af4bba53f9a875a0d320cead9f4b ]

FMODE_NOCMTIME used to be just a hack for the legacy XFS handle-based
"invisible I/O", but commit e5e9b24ab8fa ("nfsd: freeze c/mtime updates
with outstanding WRITE_ATTRS delegation") started using it from
generic callers.

I'm not sure other file systems are actually read for this in general,
so the above commit should get a closer look, but for it to make any
sense, file_update_time needs to respect the flag.

Lift the check from file_modified_flags to file_update_time so that
users of file_update_time inherit the behavior and so that all the
checks are done in one place.

Fixes: e5e9b24ab8fa ("nfsd: freeze c/mtime updates with outstanding WRITE_ATTRS delegation")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20251120064859.2911749-3-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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/inode.c