aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-10-29 10:55:05 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:03:57 -0400
commit44ec0b7179b9bce7df1080370f51314a24a00216 (patch)
tree85c529df88687a514b679ba64d678deb0e3b9586 /fs/btrfs/inode.c
parent134d45120164141c0847daf5222aaec77e04724a (diff)
Btrfs: Compile fixes for 2.6.24-rc1
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 7e4b2c1b4a56..c88f13a88555 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2176,8 +2176,12 @@ void btrfs_destroy_inode(struct inode *inode)
2176 kmem_cache_free(btrfs_inode_cachep, BTRFS_I(inode)); 2176 kmem_cache_free(btrfs_inode_cachep, BTRFS_I(inode));
2177} 2177}
2178 2178
2179#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,23)
2180static void init_once(struct kmem_cache * cachep, void *foo)
2181#else
2179static void init_once(void * foo, struct kmem_cache * cachep, 2182static void init_once(void * foo, struct kmem_cache * cachep,
2180 unsigned long flags) 2183 unsigned long flags)
2184#endif
2181{ 2185{
2182 struct btrfs_inode *ei = (struct btrfs_inode *) foo; 2186 struct btrfs_inode *ei = (struct btrfs_inode *) foo;
2183 2187
@@ -2200,8 +2204,13 @@ void btrfs_destroy_cachep(void)
2200 2204
2201struct kmem_cache *btrfs_cache_create(const char *name, size_t size, 2205struct kmem_cache *btrfs_cache_create(const char *name, size_t size,
2202 unsigned long extra_flags, 2206 unsigned long extra_flags,
2207#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,23)
2208 void (*ctor)(struct kmem_cache *, void *)
2209#else
2203 void (*ctor)(void *, struct kmem_cache *, 2210 void (*ctor)(void *, struct kmem_cache *,
2204 unsigned long)) 2211 unsigned long)
2212#endif
2213 )
2205{ 2214{
2206 return kmem_cache_create(name, size, 0, (SLAB_RECLAIM_ACCOUNT | 2215 return kmem_cache_create(name, size, 0, (SLAB_RECLAIM_ACCOUNT |
2207 SLAB_MEM_SPREAD | extra_flags), ctor 2216 SLAB_MEM_SPREAD | extra_flags), ctor