diff options
author | Niu Yawei <yawei.niu@intel.com> | 2015-02-01 21:52:12 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-02-07 17:31:10 +0800 |
commit | d27f9b077e113b0fa46e466465233a5e51085228 (patch) | |
tree | c9060b65f40d4eaa340d3d529c2ec064cd727694 | |
parent | 70c86ace9008f83f3b3b0dd995c60942e1057347 (diff) | |
download | blackbird-op-linux-d27f9b077e113b0fa46e466465233a5e51085228.tar.gz blackbird-op-linux-d27f9b077e113b0fa46e466465233a5e51085228.zip |
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: Niu Yawei <yawei.niu@intel.com>
Reviewed-on: http://review.whamcloud.com/11957
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5633
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/lustre/lustre/ptlrpc/client.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/lustre/lustre/ptlrpc/client.c b/drivers/staging/lustre/lustre/ptlrpc/client.c index 8c1ec830712f..4882dd0a4483 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/client.c +++ b/drivers/staging/lustre/lustre/ptlrpc/client.c @@ -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 */ |