Whamcloud - gitweb
merge 0.5.20.3 b_devel into b_io (ready to land)
authorpschwan <pschwan>
Sun, 2 Mar 2003 05:19:20 +0000 (05:19 +0000)
committerpschwan <pschwan>
Sun, 2 Mar 2003 05:19:20 +0000 (05:19 +0000)
lustre/include/liblustre.h

index 145d199..0b37021 100644 (file)
@@ -133,8 +133,8 @@ static inline int misc_register(void *foo)
 }
 #define misc_deregister misc_register
 
-#define __MOD_INC_USE_COUNT(m)  (m->count++)
-#define __MOD_DEC_USE_COUNT(m)  (m->count--)
+#define __MOD_INC_USE_COUNT(m)  do {int a = 1; a++; } while (0)
+#define __MOD_DEC_USE_COUNT(m)  do {int a = 1; a++; } while (0)
 #define MOD_INC_USE_COUNT  do {int a = 1; a++; } while (0)
 #define MOD_DEC_USE_COUNT  do {int a = 1; a++; } while (0)
 
@@ -222,9 +222,14 @@ typedef struct {
          int size;
 } kmem_cache_t;
 #define SLAB_HWCACHE_ALIGN 0
-static inline kmem_cache_t *kmem_cache_create(name,objsize,c,d,e,f)
+static inline kmem_cache_t *kmem_cache_create(name,objsize,cdum,d,e,f)
 {
-        return malloc(objsize);
+        kmem_cache_t *c;
+        c = malloc(sizeof(*c));
+        if (!c)
+                return NULL;
+        c->size = objsize;
+        return c;
 };
 
 static inline int kmem_cache_destroy(kmem_cache_t *a)