X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fldlm%2Fldlm_lib.c;h=3626bda7f4ba57637f9cc4d0efcc142e44dd3426;hp=cc7c81a358f95855dfa1bebde0fa793623ca9d5d;hb=e9c3b89bdacdb90332e386ae5ddff03cd8e977df;hpb=9d2776f02b67354b58e9ff93bd7fe5b5495ee288 diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index cc7c81a..3626bda 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -578,10 +578,12 @@ int client_obd_setup(struct obd_device *obd, struct lustre_cfg *lcfg) LDLM_NAMESPACE_CLIENT, LDLM_NAMESPACE_GREEDY, ns_type); - if (obd->obd_namespace == NULL) { - CERROR("Unable to create client namespace - %s\n", - obd->obd_name); - GOTO(err_import, rc = -ENOMEM); + if (IS_ERR(obd->obd_namespace)) { + rc = PTR_ERR(obd->obd_namespace); + CERROR("%s: unable to create client namespace: rc = %d\n", + obd->obd_name, rc); + obd->obd_namespace = NULL; + GOTO(err_import, rc); } RETURN(rc); @@ -595,8 +597,8 @@ err: OBD_FREE(cli->cl_mod_tag_bitmap, BITS_TO_LONGS(OBD_MAX_RIF_MAX) * sizeof(long)); cli->cl_mod_tag_bitmap = NULL; - RETURN(rc); + RETURN(rc); } EXPORT_SYMBOL(client_obd_setup);