]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
NFS: Fix a potential data corruption
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 19 Aug 2023 21:22:14 +0000 (17:22 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 24 Aug 2023 17:24:15 +0000 (13:24 -0400)
commit88975a55969e11f26fe3846bf4fbf8e7dc8cbbd4
treed17556471437b197a82c25faddd945cdae923677
parent14e7316a3c73cf45cef4422549f3585fc1c53521
NFS: Fix a potential data corruption

We must ensure that the subrequests are joined back into the head before
we can retransmit a request. If the head was not on the commit lists,
because the server wrote it synchronously, we still need to add it back
to the retransmission list.
Add a call that mirrors the effect of nfs_cancel_remove_inode() for
O_DIRECT.

Fixes: ed5d588fe47f ("NFS: Try to join page groups before an O_DIRECT retransmission")
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/direct.c