diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c index 5a4f9ae9cf0223cc20e38ff915f55885d9cdc153..fe9f6277f8286b7d53e7a2271ca69a4c65a70021 100644 --- a/lustre/ptlrpc/client.c +++ b/lustre/ptlrpc/client.c @@ -811,14 +811,20 @@ int ptlrpc_expire_one_request(struct ptlrpc_request *req) { unsigned long flags; struct obd_import *imp = req->rq_import; + int replied = 0; ENTRY; - DEBUG_REQ(D_ERROR, req, "timeout"); - spin_lock_irqsave (&req->rq_lock, flags); - req->rq_timedout = 1; + replied = req->rq_replied; + if (!replied) + req->rq_timedout = 1; spin_unlock_irqrestore (&req->rq_lock, flags); + if (replied) + RETURN(0); + + DEBUG_REQ(D_ERROR, req, "timeout"); + ptlrpc_unregister_reply (req); if (req->rq_bulk != NULL)