From 867af18e24164fe80aff2774b1fff385a4b54c04 Mon Sep 17 00:00:00 2001 From: girish <girish> Date: Wed, 10 Dec 2008 17:12:59 +0000 Subject: [PATCH] Fix lost unlinked ev in reply_in_callback (Isaac) b=17052 i=nathan.rutman i=eric.mei --- lustre/ptlrpc/events.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/lustre/ptlrpc/events.c b/lustre/ptlrpc/events.c index e765d5dd27..32b9cf5af5 100644 --- a/lustre/ptlrpc/events.c +++ b/lustre/ptlrpc/events.c @@ -105,11 +105,13 @@ void reply_in_callback(lnet_event_t *ev) req->rq_receiving_reply = 0; req->rq_early = 0; + if (ev->unlinked) + req->rq_must_unlink = 0; if (ev->status) goto out_wake; if (ev->type == LNET_EVENT_UNLINK) { - req->rq_must_unlink = 0; + LASSERT(ev->unlinked); DEBUG_REQ(D_RPCTRACE, req, "unlink"); goto out_wake; } @@ -127,18 +129,10 @@ void reply_in_callback(lnet_event_t *ev) ev->mlength, lustre_msg_early_size()); req->rq_early_count++; /* number received, client side */ - if (req->rq_replied) { - /* If we already got the real reply, then we need to - * check if lnet_finalize() unlinked the md. In that - * case, there will be no further callback of type - * LNET_EVENT_UNLINK. - */ - if (ev->unlinked) - req->rq_must_unlink = 0; - else - DEBUG_REQ(D_RPCTRACE, req, "unlinked in reply"); + + if (req->rq_replied) /* already got the real reply */ goto out_wake; - } + req->rq_early = 1; req->rq_nob_received = ev->mlength; /* repmsg points to early reply */ -- GitLab