From 5b34b32708049dad3ceceb30f299ae6f4b7bdcce Mon Sep 17 00:00:00 2001 From: yury Date: Tue, 10 Oct 2006 15:17:20 +0000 Subject: [PATCH] - reverse wrong commit about open_req. --- lustre/mdc/mdc_locks.c | 6 +++--- lustre/mdc/mdc_request.c | 7 ++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c index b6658da..fc74f5d 100644 --- a/lustre/mdc/mdc_locks.c +++ b/lustre/mdc/mdc_locks.c @@ -408,7 +408,7 @@ int mdc_enqueue(struct obd_export *exp, OBD_MD_FLACL; size[DLM_INTENT_REC_OFF] = sizeof(struct mdt_body); size[DLM_INTENT_REC_OFF + 1] = op_data->mod_capa1 ? - sizeof(struct lustre_capa) : 0; + sizeof(struct lustre_capa) : 0; if (op_data->mod_capa1) valid |= OBD_MD_FLMDSCAPA; size[DLM_INTENT_REC_OFF + 2] = op_data->namelen + 1; @@ -431,8 +431,8 @@ int mdc_enqueue(struct obd_export *exp, it->it_flags, op_data); repsize[repbufcnt++] = client_is_remote(exp) ? - sizeof(struct mdt_remote_perm) : - LUSTRE_POSIX_ACL_MAX_SIZE; + sizeof(struct mdt_remote_perm) : + LUSTRE_POSIX_ACL_MAX_SIZE; repsize[repbufcnt++] = sizeof(struct lustre_capa); } else if (it->it_op == IT_READDIR) { policy.l_inodebits.bits = MDS_INODELOCK_UPDATE; diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index 18b2ebf..cb1a94e 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -713,8 +713,8 @@ int mdc_set_open_replay_data(struct obd_export *exp, och->och_mod = mod; mod->mod_och = och; open_req->rq_cb_data = mod; + mod->mod_open_req = open_req; open_req->rq_commit_cb = mdc_commit_open; - mod->mod_open_req = ptlrpc_request_addref(open_req); } @@ -744,11 +744,8 @@ int mdc_clear_open_replay_data(struct obd_export *exp, * be freed. */ LASSERT(mod != LP_POISON); - if (mod != NULL) { - if (mod->mod_open_req != NULL) - ptlrpc_req_finished(mod->mod_open_req); + if (mod != NULL) mod->mod_och = NULL; - } och->och_mod = NULL; RETURN(0); -- 1.8.3.1