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)
committerAnna Schumaker <anna.schumaker@oracle.com>
Wed, 19 Feb 2025 21:45:23 +0000 (16:45 -0500)
commitfcf857ee1958e9247298251f7615d0c76f1e9b38
treeee48961b3823fcfd40dd870b20c446eb70cfac0e
parent0ad2507d5d93f39619fc42372c347d6006b64319
NFS: O_DIRECT writes must check and adjust the file length

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>
fs/nfs/direct.c