diff options
Diffstat (limited to 'drivers/staging/lustre/lustre/lov/lov_ea.c')
-rw-r--r-- | drivers/staging/lustre/lustre/lov/lov_ea.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/staging/lustre/lustre/lov/lov_ea.c b/drivers/staging/lustre/lustre/lov/lov_ea.c index b3c9c85aa..b6529401c 100644 --- a/drivers/staging/lustre/lustre/lov/lov_ea.c +++ b/drivers/staging/lustre/lustre/lov/lov_ea.c @@ -100,8 +100,8 @@ struct lov_stripe_md *lsm_alloc_plain(__u16 stripe_count, int *size) return NULL; for (i = 0; i < stripe_count; i++) { - loi = kmem_cache_alloc(lov_oinfo_slab, GFP_NOFS | __GFP_ZERO); - if (loi == NULL) + loi = kmem_cache_zalloc(lov_oinfo_slab, GFP_NOFS); + if (!loi) goto err; lsm->lsm_oinfo[i] = loi; } @@ -141,7 +141,7 @@ static void lsm_unpackmd_common(struct lov_stripe_md *lsm, static void lsm_stripe_by_index_plain(struct lov_stripe_md *lsm, int *stripeno, - u64 *lov_off, u64 *swidth) + u64 *lov_off, u64 *swidth) { if (swidth) *swidth = (u64)lsm->lsm_stripe_size * lsm->lsm_stripe_count; @@ -162,12 +162,13 @@ static int lsm_destroy_plain(struct lov_stripe_md *lsm, struct obdo *oa, } /* Find minimum stripe maxbytes value. For inactive or - * reconnecting targets use LUSTRE_STRIPE_MAXBYTES. */ + * reconnecting targets use LUSTRE_STRIPE_MAXBYTES. + */ static void lov_tgt_maxbytes(struct lov_tgt_desc *tgt, __u64 *stripe_maxbytes) { struct obd_import *imp = tgt->ltd_obd->u.cli.cl_import; - if (imp == NULL || !tgt->ltd_active) { + if (!imp || !tgt->ltd_active) { *stripe_maxbytes = LUSTRE_STRIPE_MAXBYTES; return; } |