Skip to content
Commit be8a1772 authored by NeilBrown's avatar NeilBrown Committed by Greg Kroah-Hartman
Browse files

NFS: Fix data corruption caused by congestion.



when AOP_WRITEPAGE_ACTIVATE is returned (as NFS does when it detects
congestion) it is important that the folio is redirtied.
nfs_writepage_locked() doesn't do this, so files can become corrupted as
writes can be lost.

Note that this is not needed in v6.8 as AOP_WRITEPAGE_ACTIVATE cannot be
returned.  It is needed for kernels v5.18..v6.7.  Prior to 6.3 the patch
is different as it needs to mention "page", not "folio".

Reported-and-tested-by: default avatarJacek Tomaka <Jacek.Tomaka@poczta.fm>
Fixes: 6df25e58

 ("nfs: remove reliance on bdi congestion")
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fa8c776f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment