Btrfs: Compile fixes for 2.6.24-rc1
authorChris Mason <chris.mason@oracle.com>
Mon, 29 Oct 2007 14:55:05 +0000 (10:55 -0400)
committerChris Mason <chris.mason@oracle.com>
Thu, 25 Sep 2008 15:03:57 +0000 (11:03 -0400)
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/inode.c

index 7e4b2c1b4a5638b1a746bf582a41d0573f50f838..c88f13a885555d57baebb6785163ad556528e31b 100644 (file)
@@ -2176,8 +2176,12 @@ void btrfs_destroy_inode(struct inode *inode)
        kmem_cache_free(btrfs_inode_cachep, BTRFS_I(inode));
 }
 
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,23)
+static void init_once(struct kmem_cache * cachep, void *foo)
+#else
 static void init_once(void * foo, struct kmem_cache * cachep,
                      unsigned long flags)
+#endif
 {
        struct btrfs_inode *ei = (struct btrfs_inode *) foo;
 
@@ -2200,8 +2204,13 @@ void btrfs_destroy_cachep(void)
 
 struct kmem_cache *btrfs_cache_create(const char *name, size_t size,
                                       unsigned long extra_flags,
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,23)
+                                      void (*ctor)(struct kmem_cache *, void *)
+#else
                                       void (*ctor)(void *, struct kmem_cache *,
-                                                   unsigned long))
+                                                   unsigned long)
+#endif
+                                    )
 {
        return kmem_cache_create(name, size, 0, (SLAB_RECLAIM_ACCOUNT |
                                 SLAB_MEM_SPREAD | extra_flags), ctor