diff options
Diffstat (limited to 'drivers/staging/lustre/lustre/ptlrpc/niobuf.c')
-rw-r--r-- | drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lustre/ptlrpc/niobuf.c b/drivers/staging/lustre/lustre/ptlrpc/niobuf.c index 3c6bf23415f9..a47a8d807d5b 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/niobuf.c +++ b/drivers/staging/lustre/lustre/ptlrpc/niobuf.c @@ -349,7 +349,7 @@ static void ptlrpc_at_set_reply(struct ptlrpc_request *req, int flags) /** * Send request reply from request \a req reply buffer. * \a flags defines reply types - * Returns 0 on sucess or error code + * Returns 0 on success or error code */ int ptlrpc_send_reply(struct ptlrpc_request *req, int flags) { @@ -389,7 +389,7 @@ int ptlrpc_send_reply(struct ptlrpc_request *req, int flags) * ptlrpc_body in reply buffer to ptlrpc_body_v2, otherwise, the * reply buffer on client will be overflow. * - * XXX Remove this whenver we drop the interoprability with such client. + * XXX Remove this whenever we drop the interoprability with such client. */ req->rq_replen = lustre_shrink_msg(req->rq_repmsg, 0, sizeof(struct ptlrpc_body_v2), 1); @@ -511,7 +511,9 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply) CDEBUG(D_HA, "muting rpc for failed imp obd %s\n", request->rq_import->imp_obd->obd_name); /* this prevents us from waiting in ptlrpc_queue_wait */ + spin_lock(&request->rq_lock); request->rq_err = 1; + spin_unlock(&request->rq_lock); request->rq_status = -ENODEV; return -ENODEV; } @@ -553,7 +555,9 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply) if (rc) { /* this prevents us from looping in * ptlrpc_queue_wait */ + spin_lock(&request->rq_lock); request->rq_err = 1; + spin_unlock(&request->rq_lock); request->rq_status = rc; GOTO(cleanup_bulk, rc); } |