diff options
Diffstat (limited to 'drivers/staging/lustre/lustre/osc/osc_dev.c')
-rw-r--r-- | drivers/staging/lustre/lustre/osc/osc_dev.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/lustre/lustre/osc/osc_dev.c b/drivers/staging/lustre/lustre/osc/osc_dev.c index 7078cc57d..d4fe507f1 100644 --- a/drivers/staging/lustre/lustre/osc/osc_dev.c +++ b/drivers/staging/lustre/lustre/osc/osc_dev.c @@ -122,8 +122,8 @@ static void *osc_key_init(const struct lu_context *ctx, { struct osc_thread_info *info; - info = kmem_cache_alloc(osc_thread_kmem, GFP_NOFS | __GFP_ZERO); - if (info == NULL) + info = kmem_cache_zalloc(osc_thread_kmem, GFP_NOFS); + if (!info) info = ERR_PTR(-ENOMEM); return info; } @@ -147,8 +147,8 @@ static void *osc_session_init(const struct lu_context *ctx, { struct osc_session *info; - info = kmem_cache_alloc(osc_session_kmem, GFP_NOFS | __GFP_ZERO); - if (info == NULL) + info = kmem_cache_zalloc(osc_session_kmem, GFP_NOFS); + if (!info) info = ERR_PTR(-ENOMEM); return info; } @@ -228,7 +228,7 @@ static struct lu_device *osc_device_alloc(const struct lu_env *env, /* Setup OSC OBD */ obd = class_name2obd(lustre_cfg_string(cfg, 0)); - LASSERT(obd != NULL); + LASSERT(obd); rc = osc_setup(obd, cfg); if (rc) { osc_device_free(env, d); |