From 62ab028c4af3dfe389afa2aa3a53f5daacf13c70 Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 10 Jul 2005 23:05:06 +0000 Subject: [PATCH] - drop reference for open replay data in mdc_commit_open() instead of mdc_commit_close() as in some cases we may have no close at all --- lustre/mdc/mdc_request.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index b417b82..dad57ef 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -396,6 +396,8 @@ static void mdc_commit_open(struct ptlrpc_request *req) OBD_FREE(mod, sizeof(*mod)); req->rq_cb_data = NULL; + LASSERT(atomic_read(&req->rq_refcount) > 1); + ptlrpc_req_finished(req); } static void mdc_replay_open(struct ptlrpc_request *req) @@ -529,7 +531,6 @@ static void mdc_commit_close(struct ptlrpc_request *req) spin_lock(&open_req->rq_lock); open_req->rq_replay = 0; spin_unlock(&open_req->rq_lock); - ptlrpc_req_finished(open_req); } int mdc_close(struct obd_export *exp, struct obdo *oa, -- 1.8.3.1