From: Dmitry Eremin Date: Thu, 11 Sep 2014 19:39:44 +0000 (+0400) Subject: LU-5577 lmv: change type of lmv_obd->tgts_size to __u32 X-Git-Tag: 2.6.53~13 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=e05348f47d036b05fd80a75176c6f0d3197e4741;p=fs%2Flustre-release.git LU-5577 lmv: change type of lmv_obd->tgts_size to __u32 tgts_size is used as unsigned. Signed-off-by: Dmitry Eremin Change-Id: Ia910f034605a787b45539952a9d1f0c0d04e8891 Reviewed-on: http://review.whamcloud.com/11881 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Fan Yong Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin --- diff --git a/lustre/include/obd.h b/lustre/include/obd.h index e0eca82..8c966ab 100644 --- a/lustre/include/obd.h +++ b/lustre/include/obd.h @@ -451,7 +451,7 @@ struct lmv_obd { int max_def_cookiesize; int server_timeout; - int tgts_size; /* size of tgts array */ + __u32 tgts_size; /* size of tgts array */ struct lmv_tgt_desc **tgts; struct obd_connect_data conn_data; diff --git a/lustre/lmv/lmv_obd.c b/lustre/lmv/lmv_obd.c index 5279964..0d36904 100644 --- a/lustre/lmv/lmv_obd.c +++ b/lustre/lmv/lmv_obd.c @@ -1440,10 +1440,10 @@ static int lmv_setup(struct obd_device *obd, struct lustre_cfg *lcfg) RETURN(-EINVAL); } - OBD_ALLOC(lmv->tgts, sizeof(*lmv->tgts) * 32); + lmv->tgts_size = 32U; + OBD_ALLOC(lmv->tgts, sizeof(*lmv->tgts) * lmv->tgts_size); if (lmv->tgts == NULL) RETURN(-ENOMEM); - lmv->tgts_size = 32; obd_str2uuid(&lmv->desc.ld_uuid, desc->ld_uuid.uuid); lmv->desc.ld_tgt_count = 0;