nfs: properly protect nfs_direct_req fields
authorJosef Bacik <josef@toxicpanda.com>
Fri, 1 Mar 2024 16:49:56 +0000 (11:49 -0500)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 9 Mar 2024 14:14:51 +0000 (09:14 -0500)
commit094501358e7a165071673e754c3925683683057f
tree1b1b28334638d38f5b1f46439eb38ffae2b1b697
parentb326df4a8ec6ef53e2e2f1c2cbf14f8a20e85baa
nfs: properly protect nfs_direct_req fields

We protect accesses to the nfs_direct_req fields with the dreq->lock
ever where except nfs_direct_commit_complete.  This isn't a huge deal,
but it does lead to confusion, and we could potentially end up setting
NFS_ODIRECT_RESCHED_WRITES in one thread where we've had an error in
another.  Clean this up to properly protect ->error and ->flags in the
commit completion path.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/direct.c