aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/direct.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-06-05 18:32:03 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-06-05 18:38:47 -0400
commit9bce008bae8b57bc7b007bcc2071d1247a527120 (patch)
treea9321dc576008102345f3b7d5df7859e5155233e /fs/nfs/direct.c
parentcdf66442fab82916fe38f928b4f91815195a294c (diff)
NFS: Fix a commit bug
The new commit code fails to copy the verifier into the wb_verf field of _all_ the nfs_page structures; it only copies it into the first entry. The consequence is that most requests end up failing to match in nfs_commit_release. Fix is to copy the verifier into the req->wb_verf field in nfs_write_completion. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: Fred Isaman <iisaman@netapp.com>
Diffstat (limited to 'fs/nfs/direct.c')
-rw-r--r--fs/nfs/direct.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 23d170bc44f4..b5385a7efd56 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -710,12 +710,12 @@ static void nfs_direct_write_completion(struct nfs_pgio_header *hdr)
710 if (dreq->flags == NFS_ODIRECT_RESCHED_WRITES) 710 if (dreq->flags == NFS_ODIRECT_RESCHED_WRITES)
711 bit = NFS_IOHDR_NEED_RESCHED; 711 bit = NFS_IOHDR_NEED_RESCHED;
712 else if (dreq->flags == 0) { 712 else if (dreq->flags == 0) {
713 memcpy(&dreq->verf, &req->wb_verf, 713 memcpy(&dreq->verf, hdr->verf,
714 sizeof(dreq->verf)); 714 sizeof(dreq->verf));
715 bit = NFS_IOHDR_NEED_COMMIT; 715 bit = NFS_IOHDR_NEED_COMMIT;
716 dreq->flags = NFS_ODIRECT_DO_COMMIT; 716 dreq->flags = NFS_ODIRECT_DO_COMMIT;
717 } else if (dreq->flags == NFS_ODIRECT_DO_COMMIT) { 717 } else if (dreq->flags == NFS_ODIRECT_DO_COMMIT) {
718 if (memcmp(&dreq->verf, &req->wb_verf, sizeof(dreq->verf))) { 718 if (memcmp(&dreq->verf, hdr->verf, sizeof(dreq->verf))) {
719 dreq->flags = NFS_ODIRECT_RESCHED_WRITES; 719 dreq->flags = NFS_ODIRECT_RESCHED_WRITES;
720 bit = NFS_IOHDR_NEED_RESCHED; 720 bit = NFS_IOHDR_NEED_RESCHED;
721 } else 721 } else