Skip to content

Commit 44ec0b7

Browse files
committed
Btrfs: Compile fixes for 2.6.24-rc1
Signed-off-by: Chris Mason <[email protected]>
1 parent 134d451 commit 44ec0b7

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

fs/btrfs/inode.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2176,8 +2176,12 @@ void btrfs_destroy_inode(struct inode *inode)
21762176
kmem_cache_free(btrfs_inode_cachep, BTRFS_I(inode));
21772177
}
21782178

2179+
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,23)
2180+
static void init_once(struct kmem_cache * cachep, void *foo)
2181+
#else
21792182
static void init_once(void * foo, struct kmem_cache * cachep,
21802183
unsigned long flags)
2184+
#endif
21812185
{
21822186
struct btrfs_inode *ei = (struct btrfs_inode *) foo;
21832187

@@ -2200,8 +2204,13 @@ void btrfs_destroy_cachep(void)
22002204

22012205
struct kmem_cache *btrfs_cache_create(const char *name, size_t size,
22022206
unsigned long extra_flags,
2207+
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,23)
2208+
void (*ctor)(struct kmem_cache *, void *)
2209+
#else
22032210
void (*ctor)(void *, struct kmem_cache *,
2204-
unsigned long))
2211+
unsigned long)
2212+
#endif
2213+
)
22052214
{
22062215
return kmem_cache_create(name, size, 0, (SLAB_RECLAIM_ACCOUNT |
22072216
SLAB_MEM_SPREAD | extra_flags), ctor

0 commit comments

Comments
 (0)