From 0b52e747170deef972fd9f9dc4954767bacfbcc4 Mon Sep 17 00:00:00 2001 From: yury Date: Tue, 18 Nov 2008 20:57:18 +0000 Subject: [PATCH] b=17686 r=panda,shadow - fixes race in ptlrpcd (happens when stopping ptlrpcd right after adding new req to it) which leads to hanging new added rpc whcih in turn leads to keeping ref to import, obd that makes it impossible to cleanup; - cleanups and more debugs in recov_thread to detect things like this. --- lustre/ptlrpc/client.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c index 255d357..5f74334 100644 --- a/lustre/ptlrpc/client.c +++ b/lustre/ptlrpc/client.c @@ -2295,24 +2295,24 @@ void ptlrpc_abort_inflight(struct obd_import *imp) void ptlrpc_abort_set(struct ptlrpc_request_set *set) { - struct list_head *tmp, *n; + struct list_head *tmp, *pos; LASSERT(set != NULL); - list_for_each_safe(tmp, n, &set->set_requests) { + list_for_each_safe(pos, tmp, &set->set_requests) { struct ptlrpc_request *req = - list_entry(tmp, struct ptlrpc_request, rq_set_chain); + list_entry(pos, struct ptlrpc_request, rq_set_chain); - spin_lock (&req->rq_lock); + spin_lock(&req->rq_lock); if (req->rq_phase != RQ_PHASE_RPC) { - spin_unlock (&req->rq_lock); + spin_unlock(&req->rq_lock); continue; } req->rq_err = 1; req->rq_status = -EINTR; ptlrpc_client_wake_req(req); - spin_unlock (&req->rq_lock); + spin_unlock(&req->rq_lock); } } -- 1.8.3.1