Commit d27f9b07 authored by Niu Yawei's avatar Niu Yawei Committed by Greg Kroah-Hartman

staging/lustre/ptlrpc: hold rq_lock when modify rq_flags

In after_reply(), take the rq_lock for changing the rq_resend.
Signed-off-by: default avatarNiu Yawei <yawei.niu@intel.com>
Reviewed-on: http://review.whamcloud.com/11957
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5633Reviewed-by: default avatarFan Yong <fan.yong@intel.com>
Reviewed-by: default avatarJohann Lombardi <johann.lombardi@intel.com>
Signed-off-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 70c86ace
......@@ -1247,7 +1247,9 @@ static int after_reply(struct ptlrpc_request *req)
time_t now = get_seconds();
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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment