From: huanghua Date: Mon, 22 May 2006 06:40:08 +0000 (+0000) Subject: nicer indent. X-Git-Tag: v1_8_0_110~486^2~1786 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=18328cbc78335c8d872b5143c8d937f90a300b59;p=fs%2Flustre-release.git nicer indent. --- diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index 32e935f..0d1a91d 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -1074,35 +1074,37 @@ static int mdt_intent_policy(struct ldlm_namespace *ns, } if (it->opc == IT_GETATTR || it->opc == IT_LOOKUP) { - body = info->mti_body = lustre_swab_reqbuf(req, MDS_REQ_INTENT_REC_OFF, - sizeof *body, - lustre_swab_mdt_body); - if (body != NULL) { - struct mdt_object *obj; - const struct lu_context *ctx = info->mti_ctxt; - - obj = mdt_object_find(ctx, info->mti_mdt, &body->fid1); - if (!IS_ERR(obj)) { - if (!lu_object_exists(ctx, &obj->mot_obj.mo_lu)) { - CERROR("Object doesn't exist\n"); - mdt_object_put(ctx, obj); - rc = -ENOENT; - } else { - info->mti_object = obj; - rc = 0; - } - } else - rc = PTR_ERR(obj); - } else { - CERROR("Can't unpack body\n"); - rc = -EFAULT; - } + body = lustre_swab_reqbuf(req, MDS_REQ_INTENT_REC_OFF, + sizeof *body, + lustre_swab_mdt_body); + info->mti_body = body; + if (body != NULL) { + struct mdt_object *obj; + const struct lu_context *ctx = info->mti_ctxt; - //TODO: if rc then pack reply according to it - if (rc) { - CERROR("Cannot prepare intent info, rc=%u\n", rc); - RETURN(req->rq_status = rc); - } + obj = mdt_object_find(ctx, info->mti_mdt, &body->fid1); + if (!IS_ERR(obj)) { + if (!lu_object_exists(ctx, + &obj->mot_obj.mo_lu)) { + CERROR("Object doesn't exist\n"); + mdt_object_put(ctx, obj); + rc = -ENOENT; + } else { + info->mti_object = obj; + rc = 0; + } + } else + rc = PTR_ERR(obj); + } else { + CERROR("Can't unpack body\n"); + rc = -EFAULT; + } + + //TODO: if rc then pack reply according to it + if (rc) { + CERROR("Cannot prepare intent info, rc=%u\n", rc); + RETURN(req->rq_status = rc); + } } LDLM_DEBUG(lock, "intent policy, opc: %s", ldlm_it2str(it->opc)); info->mti_rep_buf_nr = 3;