From 7b01d34b8cc59504b59e10b55b15ece8844373c7 Mon Sep 17 00:00:00 2001 From: yury Date: Sat, 26 Aug 2006 08:34:58 +0000 Subject: [PATCH] - in lmv remove not needed checks. --- lustre/lmv/lmv_intent.c | 12 +++++++----- lustre/lmv/lmv_obd.c | 22 ++++++---------------- 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/lustre/lmv/lmv_intent.c b/lustre/lmv/lmv_intent.c index 97edb0e..c314074 100644 --- a/lustre/lmv/lmv_intent.c +++ b/lustre/lmv/lmv_intent.c @@ -80,7 +80,7 @@ int lmv_intent_remote(struct obd_export *exp, void *lmm, * oh, MDS reports that this is remote inode case i.e. we have to ask * for real attrs on another MDS. */ - if (it->it_op & IT_LOOKUP/* || it->it_op & IT_CHDIR*/) { + if (it->it_op & IT_LOOKUP) { /* * unfortunately, we have to lie to MDC/MDS to retrieve * attributes llite needs. @@ -455,13 +455,14 @@ int lmv_lookup_slaves(struct obd_export *exp, struct ptlrpc_request **reqp) * attributes to be returned from the slaves it's important that lookup * is called in two cases: - * - for first time (dcache has no such a resolving yet). - * - ->d_revalidate() returned false. + * - for first time (dcache has no such a resolving yet). - + * ->d_revalidate() returned false. * last case possible only if all the objs (master and all slaves aren't * valid */ - body = lustre_msg_buf((*reqp)->rq_repmsg, DLM_REPLY_REC_OFF, sizeof(*body)); + body = lustre_msg_buf((*reqp)->rq_repmsg, + DLM_REPLY_REC_OFF, sizeof(*body)); LASSERT(body != NULL); LASSERT((body->valid & OBD_MD_FLID) != 0); @@ -681,7 +682,8 @@ repeat: if (rc == 0 && (mea = lmv_get_mea(*reqp, DLM_REPLY_REC_OFF))) { /* wow! this is split dir, we'd like to handle it */ - body = lustre_msg_buf((*reqp)->rq_repmsg, DLM_REPLY_REC_OFF, sizeof(*body)); + body = lustre_msg_buf((*reqp)->rq_repmsg, + DLM_REPLY_REC_OFF, sizeof(*body)); LASSERT(body != NULL); LASSERT((body->valid & OBD_MD_FLID) != 0); diff --git a/lustre/lmv/lmv_obd.c b/lustre/lmv/lmv_obd.c index bfb29ef..669f335 100644 --- a/lustre/lmv/lmv_obd.c +++ b/lustre/lmv/lmv_obd.c @@ -1205,7 +1205,6 @@ int lmv_create(struct obd_export *exp, struct md_op_data *op_data, struct obd_device *obd = exp->exp_obd; struct lmv_obd *lmv = &obd->u.lmv; struct obd_export *tgt_exp; - struct mdt_body *body; struct lmv_obj *obj; int rc, loop = 0; ENTRY; @@ -1240,16 +1239,12 @@ repeat: if (rc == 0) { if (*request == NULL) RETURN(rc); - - body = lustre_msg_buf((*request)->rq_repmsg, REQ_REC_OFF, - sizeof(*body)); - if (body == NULL) - RETURN(-ENOMEM); - CDEBUG(D_OTHER, "created. "DFID"\n", PFID(&op_data->fid1)); } else if (rc == -ERESTART) { - /* directory got split. time to update local object and repeat - * the request with proper MDS. */ + /* + * Directory got split. time to update local object and repeat + * the request with proper MDS. + */ rc = lmv_handle_split(exp, &op_data->fid1); if (rc == 0) { ptlrpc_req_finished(*request); @@ -1364,7 +1359,8 @@ lmv_enqueue_remote(struct obd_export *exp, int lock_type, int rc = 0, pmode; ENTRY; - body = lustre_msg_buf(req->rq_repmsg, DLM_REPLY_REC_OFF, sizeof(*body)); + body = lustre_msg_buf(req->rq_repmsg, + DLM_REPLY_REC_OFF, sizeof(*body)); LASSERT(body != NULL); if (!(body->valid & OBD_MD_MDS)) @@ -1696,7 +1692,6 @@ static int lmv_setattr(struct obd_export *exp, struct md_op_data *op_data, struct lmv_obd *lmv = &obd->u.lmv; struct ptlrpc_request *req; struct obd_export *tgt_exp; - struct mdt_body *body; struct lmv_obj *obj; int rc = 0, i; ENTRY; @@ -1744,11 +1739,6 @@ static int lmv_setattr(struct obd_export *exp, struct md_op_data *op_data, rc = md_setattr(tgt_exp, op_data, iattr, ea, ealen, ea2, ea2len, request); - if (rc == 0) { - body = lustre_msg_buf((*request)->rq_repmsg, REQ_REC_OFF, - sizeof(*body)); - LASSERT(body != NULL); - } } RETURN(rc); } -- 1.8.3.1