nfsd: Replace use of rwsem with errseq_t
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sun, 19 Dec 2021 01:38:01 +0000 (20:38 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Jun 2022 12:21:54 +0000 (14:21 +0200)
commit3145fe0ebb16e1715ad541a301bc6675c8375fcd
tree9b4c1970386c67b9453e7a1a91414ee07cc59089
parent22fbef00c9a3d1aac705e3dc3493bad92360bb41
nfsd: Replace use of rwsem with errseq_t

commit 555dbf1a9aac6d3150c8b52fa35f768a692f4eeb upstream.

The nfsd_file nf_rwsem is currently being used to separate file write
and commit instances to ensure that we catch errors and apply them to
the correct write/commit.
We can improve scalability at the expense of a little accuracy (some
extra false positives) by replacing the nf_rwsem with more careful
use of the errseq_t mechanism to track errors across the different
operations.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
[ cel: rebased on zero-verifier fix ]
Signed-off-by: Leah Rumancik <leah.rumancik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfsd/filecache.c
fs/nfsd/filecache.h
fs/nfsd/nfs4proc.c
fs/nfsd/vfs.c