]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFS: O_DIRECT writes must check and adjust the file length
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 1 Feb 2025 19:59:02 +0000 (14:59 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Mar 2025 17:25:26 +0000 (18:25 +0100)
commitb7b3d772e48aa76a6733f241c63e589799b09cdc
tree00f62d076d4d41eb49865afdeaefff0dbfc0cd4c
parent3594aad97e7be2557ca9fa9c931b206b604028c8
NFS: O_DIRECT writes must check and adjust the file length

[ Upstream commit fcf857ee1958e9247298251f7615d0c76f1e9b38 ]

While it is uncommon for delegations to be held while O_DIRECT writes
are in progress, it is possible. The xfstests generic/647 and
generic/729 both end up triggering that state, and end up failing due to
the fact that the file size is not adjusted.

Reported-by: Chuck Lever <chuck.lever@oracle.com>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=219738
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Stable-dep-of: 88025c67fe3c ("NFS: Adjust delegated timestamps for O_DIRECT reads and writes")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/direct.c