Whamcloud - gitweb
LU-4524 ldlm: improve ldlm_lock_create() return value
[fs/lustre-release.git] / lustre / osc / osc_request.c
index 10f9328..9421044 100644 (file)
@@ -658,7 +658,7 @@ static int osc_resource_get_unused(struct obd_export *exp, struct obdo *oa,
 
        ostid_build_res_name(&oa->o_oi, &res_id);
        res = ldlm_resource_get(ns, NULL, &res_id, 0, 0);
-       if (res == NULL)
+       if (IS_ERR(res))
                RETURN(0);
 
         LDLM_RESOURCE_ADDREF(res);