From 526e9c54f2113da0c1484e70791167f7d16cbf00 Mon Sep 17 00:00:00 2001 From: "hongchao.zhang" Date: Fri, 28 May 2010 06:18:16 +0800 Subject: [PATCH] b=21938 wait and signal correct waitq update patch to use req->rq_set_waitq instead of req->rq_reply_waitq i=johann i=robert.read --- lustre/ptlrpc/client.c | 4 ++++ lustre/ptlrpc/ptlrpcd.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c index 7802282..5833e80 100644 --- a/lustre/ptlrpc/client.c +++ b/lustre/ptlrpc/client.c @@ -795,7 +795,11 @@ void ptlrpc_set_destroy(struct ptlrpc_request_set *set) cfs_atomic_dec(&set->set_remaining); } + cfs_spin_lock(&req->rq_lock); req->rq_set = NULL; + req->rq_invalid_rqset = 0; + cfs_spin_unlock(&req->rq_lock); + ptlrpc_req_finished (req); } diff --git a/lustre/ptlrpc/ptlrpcd.c b/lustre/ptlrpc/ptlrpcd.c index 225db05..aba0893 100644 --- a/lustre/ptlrpc/ptlrpcd.c +++ b/lustre/ptlrpc/ptlrpcd.c @@ -147,7 +147,7 @@ int ptlrpcd_add_req(struct ptlrpc_request *req, enum ptlrpcd_scope scope) timeout = cfs_time_seconds(5); lwi = LWI_TIMEOUT(timeout, back_to_sleep, NULL); - l_wait_event(req->rq_reply_waitq, (req->rq_set == NULL), &lwi); + l_wait_event(req->rq_set_waitq, (req->rq_set == NULL), &lwi); } else if (req->rq_set) { LASSERT(req->rq_phase == RQ_PHASE_NEW); LASSERT(req->rq_send_state == LUSTRE_IMP_REPLAY); -- 1.8.3.1