From caf71aeffd38969493e6875f360f57821ce952c4 Mon Sep 17 00:00:00 2001 From: braam Date: Sun, 3 Mar 2002 07:46:16 +0000 Subject: [PATCH] - small fixes; things work. --- lustre/osc/osc_request.c | 4 ++-- lustre/ost/ost_handler.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 828f83b..642751b 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -428,7 +428,7 @@ int osc_brw_write(struct obd_conn *conn, obd_count num_oa, struct obdo **oa, } OBD_ALLOC(src, size2); - if (src) { + if (!src) { CERROR("no src memory\n"); return -ENOMEM; } @@ -479,7 +479,7 @@ int osc_brw_write(struct obd_conn *conn, obd_count num_oa, struct obdo **oa, n++; } } - + OBD_FREE(src); out: if (request->rq_rephdr) OBD_FREE(request->rq_rephdr, request->rq_replen); diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index 920746b..cdd5245 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -269,7 +269,7 @@ static int ost_brw_read(struct ost_obd *obddev, struct ptlrpc_request *req) char *tmp1, *tmp2, *end2; char *res = NULL; int cmd; - struct niobuf *nb, *src; + struct niobuf *nb, *src, *dst; struct obd_ioobj *ioo; struct ost_req *r = req->rq_req.ost; @@ -329,9 +329,9 @@ static int ost_brw_read(struct ost_obd *obddev, struct ptlrpc_request *req) goto out; } - src = &((struct niobuf *)tmp2)[i]; - - bulk->b_xid = src->xid; + src = &((struct niobuf *)res)[i]; + dst = &((struct niobuf *)tmp2)[i]; + bulk->b_xid = dst->xid; bulk->b_buf = (void *)(unsigned long)src->addr; bulk->b_buflen = PAGE_SIZE; rc = ptlrpc_send_bulk(bulk, OST_BULK_PORTAL); -- 1.8.3.1