]> 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:35:44 +0000 (16:35 +0200)
commitabfd17844a0a95534782f1ac6bf2c44fc1198382
treec84f2469209e7a8c9c4493e453288a511a374ef1
parent7f08d14103f35d5de7d68861896a6384eca35263
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