simplify and fix adm5120 image building, fix broken FEATURES handling
[openwrt.git] / package / fuse / patches / 220-kmem_cache.patch
1 Index: fuse-2.6.5/kernel/dev.c
2 ===================================================================
3 --- fuse-2.6.5.orig/kernel/dev.c 2007-06-23 13:03:50.000000000 +0200
4 +++ fuse-2.6.5/kernel/dev.c 2007-06-23 13:03:51.000000000 +0200
5 @@ -21,7 +21,11 @@
6 MODULE_ALIAS_MISCDEV(FUSE_MINOR);
7 #endif
8
9 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
10 +static struct kmem_cache *fuse_req_cachep;
11 +#else
12 static kmem_cache_t *fuse_req_cachep;
13 +#endif
14
15 static struct fuse_conn *fuse_get_conn(struct file *file)
16 {
17 @@ -1093,9 +1097,13 @@
18 int __init fuse_dev_init(void)
19 {
20 int err = -ENOMEM;
21 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
22 + fuse_req_cachep = KMEM_CACHE(fuse_req, 0);
23 +#else
24 fuse_req_cachep = kmem_cache_create("fuse_request",
25 sizeof(struct fuse_req),
26 0, 0, NULL, NULL);
27 +#endif
28 if (!fuse_req_cachep)
29 goto out;
30
31 Index: fuse-2.6.5/kernel/inode.c
32 ===================================================================
33 --- fuse-2.6.5.orig/kernel/inode.c 2007-06-23 13:03:50.000000000 +0200
34 +++ fuse-2.6.5/kernel/inode.c 2007-06-23 13:03:51.000000000 +0200
35 @@ -24,7 +24,7 @@
36 MODULE_LICENSE("GPL");
37 #endif
38
39 -static kmem_cache_t *fuse_inode_cachep;
40 +static struct kmem_cache *fuse_inode_cachep;
41 struct list_head fuse_conn_list;
42 DEFINE_MUTEX(fuse_mutex);
43
44 @@ -804,14 +804,12 @@
45 static decl_subsys(fuse, NULL, NULL);
46 static decl_subsys(connections, NULL, NULL);
47
48 -static void fuse_inode_init_once(void *foo, kmem_cache_t *cachep,
49 +static void fuse_inode_init_once(void *foo, struct kmem_cache *cachep,
50 unsigned long flags)
51 {
52 struct inode * inode = foo;
53
54 - if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) ==
55 - SLAB_CTOR_CONSTRUCTOR)
56 - inode_init_once(inode);
57 + inode_init_once(inode);
58 }
59
60 static int __init fuse_fs_init(void)
This page took 0.046074 seconds and 5 git commands to generate.