From 122fd97912dc8f5f2c160f84a4cc54d5212af68f Mon Sep 17 00:00:00 2001
From: zab <zab>
Date: Sat, 7 Feb 2004 00:37:01 +0000
Subject: [PATCH] b=2683 In the echo_client's prep/commit test ioo_bufcnt could
 be out of sync with the npages given to obd_{prep,commit}rw.

---
 lustre/obdecho/echo_client.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lustre/obdecho/echo_client.c b/lustre/obdecho/echo_client.c
index 87b2f92b69..fa591b22a3 100644
--- a/lustre/obdecho/echo_client.c
+++ b/lustre/obdecho/echo_client.c
@@ -864,7 +864,6 @@ static int echo_client_prep_commit(struct obd_export *exp, int rw,
                 GOTO(out, ret = -ENOMEM);
 
         obdo_to_ioobj(oa, &ioo);
-        ioo.ioo_bufcnt = npages;
 
         off = offset;
 
@@ -879,6 +878,7 @@ static int echo_client_prep_commit(struct obd_export *exp, int rw,
 
                 /* XXX this can't be the best.. */
                 memset(oti, 0, sizeof(*oti));
+                ioo.ioo_bufcnt = npages;
 
                 ret = obd_preprw(rw, exp, oa, 1, &ioo, npages, rnb, lnb, oti);
                 if (ret != 0)
-- 
GitLab