Whamcloud - gitweb
Don't use SLAB_KERNEL (GFP_KERNEL) allocations for locks and resources.
authoradilger <adilger>
Mon, 5 Jan 2004 18:52:14 +0000 (18:52 +0000)
committeradilger <adilger>
Mon, 5 Jan 2004 18:52:14 +0000 (18:52 +0000)
This is the bug that started it all, and was fixed only in b_llnl_prod...
b=1933
r=zab

lustre/ldlm/ldlm_lock.c
lustre/ldlm/ldlm_resource.c

index c1d0923..14b2971 100644 (file)
@@ -238,7 +238,7 @@ static struct ldlm_lock *ldlm_lock_new(struct ldlm_lock *parent,
         if (resource == NULL)
                 LBUG();
 
-        OBD_SLAB_ALLOC(lock, ldlm_lock_slab, SLAB_KERNEL, sizeof(*lock));
+        OBD_SLAB_ALLOC(lock, ldlm_lock_slab, SLAB_NOFS, sizeof(*lock));
         if (lock == NULL)
                 RETURN(NULL);
 
index ab36d71..0c0b51f 100644 (file)
@@ -419,7 +419,7 @@ static struct ldlm_resource *ldlm_resource_new(void)
 {
         struct ldlm_resource *res;
 
-        OBD_SLAB_ALLOC(res, ldlm_resource_slab, SLAB_KERNEL, sizeof *res);
+        OBD_SLAB_ALLOC(res, ldlm_resource_slab, SLAB_NOFS, sizeof *res);
         if (res == NULL) {
                 LBUG();
                 return NULL;