]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFS: Serialise O_DIRECT i/o and truncate()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 5 Sep 2025 16:06:23 +0000 (12:06 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Sep 2025 14:32:02 +0000 (16:32 +0200)
commit320a0954e2c8779cf2512dfc59b511b61f17d16b
treedd74ad74d517882ad3cc8b666b14a869fdb914b2
parent275d9fd06d9664b0457f87f4bc742b0820a7826a
NFS: Serialise O_DIRECT i/o and truncate()

[ Upstream commit 9eb90f435415c7da4800974ed943e39b5578ee7f ]

Ensure that all O_DIRECT reads and writes are complete, and prevent the
initiation of new i/o until the setattr operation that will truncate the
file is complete.

Fixes: a5864c999de6 ("NFS: Do not serialise O_DIRECT reads and writes")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/inode.c
fs/nfs/internal.h
fs/nfs/io.c