From bb340f259f68f4e77907ec75a9349181caf19764 Mon Sep 17 00:00:00 2001 From: Niu Yawei Date: Wed, 17 Sep 2014 04:00:01 -0400 Subject: [PATCH] LU-5633 ptlrpc: hold rq_lock when modify rq_flags In after_reply(), take the rq_lock for changing the rq_resend. Signed-off-by: Niu Yawei Change-Id: Id2025f0d5c6e7b0991f9ced031433a4d69dd1a16 Reviewed-on: http://review.whamcloud.com/11957 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Fan Yong Reviewed-by: Johann Lombardi Reviewed-by: Oleg Drokin --- lustre/ptlrpc/client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c index ddfc91b..505998c 100644 --- a/lustre/ptlrpc/client.c +++ b/lustre/ptlrpc/client.c @@ -1268,7 +1268,9 @@ static int after_reply(struct ptlrpc_request *req) time_t now = cfs_time_current_sec(); DEBUG_REQ(D_RPCTRACE, req, "Resending request on EINPROGRESS"); + spin_lock(&req->rq_lock); req->rq_resend = 1; + spin_unlock(&req->rq_lock); req->rq_nr_resend++; /* allocate new xid to avoid reply reconstruction */ -- 1.8.3.1