aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2023-10-12 19:41:41 +0200
committerGreg Kroah-Hartman2023-10-15 18:32:41 +0200
commitb0cee281c433e5012134441d80e0a7b0a2cf950f (patch)
treeae4ef708c1b1de0ca41b9f0420f4059155a1c58c
parentebf5841ac1ed18f521eb0cf570ef2626a2404cf4 (diff)
Revert "NFS: Fix O_DIRECT locking issues"
This reverts commit 4d98038e5bd939bd13cc4e602dfe60cd5110efa8 which is commit 7c6339322ce0c6128acbe36aacc1eeb986dd7bf1 upstream. There are reported NFS problems in the 6.1.56 release, so revert a set of NFS patches to hopefully resolve the issue. Reported-by: poester <poester@internetbrands.com> Link: https://lore.kernel.org/r/20231012165439.137237-2-kernel@linuxace.com Reported-by: Daniel Díaz <daniel.diaz@linaro.org> Link: https://lore.kernel.org/r/2023100755-livestock-barcode-fe41@gregkh Cc: Trond Myklebust <trond.myklebust@hammerspace.com> Cc: Anna Schumaker <Anna.Schumaker@Netapp.com> Cc: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/nfs/direct.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 449d248fc1ec..d71762f32b6c 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -555,7 +555,7 @@ static void nfs_direct_write_reschedule(struct nfs_direct_req *dreq)
/* Bump the transmission count */
req->wb_nio++;
if (!nfs_pageio_add_request(&desc, req)) {
- spin_lock(&dreq->lock);
+ spin_lock(&cinfo.inode->i_lock);
if (dreq->error < 0) {
desc.pg_error = dreq->error;
} else if (desc.pg_error != -EAGAIN) {
@@ -565,7 +565,7 @@ static void nfs_direct_write_reschedule(struct nfs_direct_req *dreq)
dreq->error = desc.pg_error;
} else
dreq->flags = NFS_ODIRECT_RESCHED_WRITES;
- spin_unlock(&dreq->lock);
+ spin_unlock(&cinfo.inode->i_lock);
break;
}
nfs_release_request(req);
@@ -875,9 +875,9 @@ static ssize_t nfs_direct_write_schedule_iovec(struct nfs_direct_req *dreq,
/* If the error is soft, defer remaining requests */
nfs_init_cinfo_from_dreq(&cinfo, dreq);
- spin_lock(&dreq->lock);
+ spin_lock(&cinfo.inode->i_lock);
dreq->flags = NFS_ODIRECT_RESCHED_WRITES;
- spin_unlock(&dreq->lock);
+ spin_unlock(&cinfo.inode->i_lock);
nfs_unlock_request(req);
nfs_mark_request_commit(req, NULL, &cinfo, 0);
desc.pg_error = 0;