summaryrefslogtreecommitdiff
path: root/fs/nfs/direct.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2023-09-04 12:34:40 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-10-06 14:56:31 +0200
commitd4729af1c73cfacb64facda3d196e25940f0e7a5 (patch)
treeb6d9194fa4e87404a0ae7148bb7b1530a644a7fb /fs/nfs/direct.c
parent1f49386d67792424028acfe781d466b010f8fa3f (diff)
downloadlinux-d4729af1c73cfacb64facda3d196e25940f0e7a5.tar.gz
linux-d4729af1c73cfacb64facda3d196e25940f0e7a5.tar.bz2
linux-d4729af1c73cfacb64facda3d196e25940f0e7a5.zip
NFS: Use the correct commit info in nfs_join_page_group()
[ Upstream commit b193a78ddb5ee7dba074d3f28dc050069ba083c0 ] Ensure that nfs_clear_request_commit() updates the correct counters when it removes them from the commit list. Fixes: ed5d588fe47f ("NFS: Try to join page groups before an O_DIRECT retransmission") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/nfs/direct.c')
-rw-r--r--fs/nfs/direct.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index d879c3229efd..04ebe9633630 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -500,7 +500,9 @@ static void nfs_direct_add_page_head(struct list_head *list,
kref_get(&head->wb_kref);
}
-static void nfs_direct_join_group(struct list_head *list, struct inode *inode)
+static void nfs_direct_join_group(struct list_head *list,
+ struct nfs_commit_info *cinfo,
+ struct inode *inode)
{
struct nfs_page *req, *subreq;
@@ -522,7 +524,7 @@ static void nfs_direct_join_group(struct list_head *list, struct inode *inode)
nfs_release_request(subreq);
}
} while ((subreq = subreq->wb_this_page) != req);
- nfs_join_page_group(req, inode);
+ nfs_join_page_group(req, cinfo, inode);
}
}
@@ -547,7 +549,7 @@ static void nfs_direct_write_reschedule(struct nfs_direct_req *dreq)
nfs_init_cinfo_from_dreq(&cinfo, dreq);
nfs_direct_write_scan_commit_list(dreq->inode, &reqs, &cinfo);
- nfs_direct_join_group(&reqs, dreq->inode);
+ nfs_direct_join_group(&reqs, &cinfo, dreq->inode);
nfs_clear_pnfs_ds_commit_verifiers(&dreq->ds_cinfo);
get_dreq(dreq);