X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Flov%2Flov_ea.c;h=a2bda2495dfff376a6f8e0ea13a93d4258911726;hb=4b550a38c5e261abe74ec323780d22c631988f16;hp=f403660671fd5fa0ee718e3e70eb518880d57f19;hpb=90a8375bf34ccdd5adcc514cfefed3871d0fbb73;p=fs%2Flustre-release.git diff --git a/lustre/lov/lov_ea.c b/lustre/lov/lov_ea.c index f403660..a2bda24 100755 --- a/lustre/lov/lov_ea.c +++ b/lustre/lov/lov_ea.c @@ -112,7 +112,7 @@ struct lov_stripe_md *lsm_alloc_plain(int stripe_count, int *size) return NULL;; for (i = 0; i < stripe_count; i++) { - OBD_SLAB_ALLOC(loi, lov_oinfo_slab, CFS_ALLOC_IO, sizeof(*loi)); + OBD_SLAB_ALLOC_PTR_GFP(loi, lov_oinfo_slab, CFS_ALLOC_IO); if (loi == NULL) goto err; lsm->lsm_oinfo[i] = loi; @@ -255,7 +255,7 @@ int lsm_unpackmd_v1(struct lov_obd *lov, struct lov_stripe_md *lsm, return 0; } -struct lsm_operations lsm_v1_ops = { +const struct lsm_operations lsm_v1_ops = { .lsm_free = lsm_free_plain, .lsm_destroy = lsm_destroy_plain, .lsm_stripe_by_index = lsm_stripe_by_index_plain, @@ -500,7 +500,7 @@ static int lsm_revalidate_join(struct lov_stripe_md *lsm, OBD_ALLOC(lsm->lsm_array->lai_ext_array,lsm->lsm_array->lai_ext_count * sizeof (struct lov_extent)); if (!lsm->lsm_array->lai_ext_array) - GOTO(release_ctxt, rc = -ENOMEM); + GOTO(release_ctxt, rc = -ENOMEM); CDEBUG(D_INFO, "get lsm logid: "LPU64":"LPU64"\n", lsm->lsm_array->lai_array_id.lgl_oid, @@ -526,7 +526,7 @@ release_ctxt: RETURN(rc); } -int lsm_destroy_join(struct lov_stripe_md *lsm, struct obdo *oa, +int lsm_destroy_join(struct lov_stripe_md *lsm, struct obdo *oa, struct obd_export *md_exp) { struct llog_ctxt *ctxt; @@ -619,7 +619,7 @@ out: RETURN(rc); } -struct lsm_operations lsm_join_ops = { +const struct lsm_operations lsm_join_ops = { .lsm_free = lsm_free_join, .lsm_destroy = lsm_destroy_join, .lsm_stripe_by_index = lsm_stripe_by_index_join, @@ -694,7 +694,7 @@ int lsm_unpackmd_v3(struct lov_obd *lov, struct lov_stripe_md *lsm, return 0; } -struct lsm_operations lsm_v3_ops = { +const struct lsm_operations lsm_v3_ops = { .lsm_free = lsm_free_plain, .lsm_destroy = lsm_destroy_plain, .lsm_stripe_by_index = lsm_stripe_by_index_plain,