Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / ldlm / ldlm_resource.c
index c04d948..e5caa7b 100644 (file)
@@ -688,7 +688,6 @@ void ldlm_namespace_free(struct ldlm_namespace *ns,
 
 void ldlm_namespace_get_locked(struct ldlm_namespace *ns)
 {
-        LASSERT(ns->ns_refcount >= 0);
         ns->ns_refcount++;
 }
 
@@ -774,7 +773,7 @@ static struct ldlm_resource *ldlm_resource_new(void)
         struct ldlm_resource *res;
         int idx;
 
-        OBD_SLAB_ALLOC(res, ldlm_resource_slab, CFS_ALLOC_IO, sizeof *res);
+        OBD_SLAB_ALLOC_PTR_GFP(res, ldlm_resource_slab, CFS_ALLOC_IO);
         if (res == NULL)
                 return NULL;