SOURCES: shfs-kmem_cache.patch (NEW) - kmem_cache_t -> struct kmem...
zbyniu
zbyniu at pld-linux.org
Sun Mar 9 03:38:35 CET 2008
Author: zbyniu Date: Sun Mar 9 02:38:35 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- kmem_cache_t -> struct kmem_cache (prefered since 2.6.20, required by .24)
---- Files affected:
SOURCES:
shfs-kmem_cache.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/shfs-kmem_cache.patch
diff -u /dev/null SOURCES/shfs-kmem_cache.patch:1.1
--- /dev/null Sun Mar 9 03:38:35 2008
+++ SOURCES/shfs-kmem_cache.patch Sun Mar 9 03:38:30 2008
@@ -0,0 +1,88 @@
+diff -urp shfs-0.35./shfs/Linux-2.6/fcache.c shfs-0.35/shfs/Linux-2.6/fcache.c
+--- shfs-0.35./shfs/Linux-2.6/fcache.c 2008-03-09 02:36:50.429634000 +0100
++++ shfs-0.35/shfs/Linux-2.6/fcache.c 2008-03-09 03:26:46.223740971 +0100
+@@ -29,12 +29,16 @@ struct shfs_file {
+ char *data;
+ };
+
+-kmem_cache_t *file_cache = NULL;
++struct kmem_cache *file_cache = NULL;
+
+ void
+ fcache_init(void)
+ {
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23))
+ file_cache = kmem_cache_create("shfs_file", sizeof(struct shfs_file), 0, 0, NULL, NULL);
++#else
++ file_cache = kmem_cache_create("shfs_file", sizeof(struct shfs_file), 0, NULL, NULL);
++#endif
+ DEBUG("file_cache: %p\n", file_cache);
+ }
+
+Tylko w shfs-0.35/shfs/Linux-2.6: fcache.c~
+diff -urp shfs-0.35./shfs/Linux-2.6/inode.c shfs-0.35/shfs/Linux-2.6/inode.c
+--- shfs-0.35./shfs/Linux-2.6/inode.c 2008-03-09 02:36:50.429634000 +0100
++++ shfs-0.35/shfs/Linux-2.6/inode.c 2008-03-09 03:26:23.725287472 +0100
+@@ -30,7 +30,7 @@ int debug_level;
+ unsigned long alloc;
+ #endif
+
+-kmem_cache_t *inode_cache = NULL;
++struct kmem_cache *inode_cache = NULL;
+
+ void
+ shfs_set_inode_attr(struct inode *inode, struct shfs_fattr *fattr)
+@@ -388,8 +388,12 @@ init_shfs(void)
+ {
+ printk(KERN_NOTICE "SHell File System, (c) 2002-2004 Miroslav Spousta\n");
+ fcache_init();
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23))
+ inode_cache = kmem_cache_create("shfs_inode", sizeof(struct shfs_inode_info), 0, 0, NULL, NULL);
+-
++#else
++ inode_cache = kmem_cache_create("shfs_inode", sizeof(struct shfs_inode_info), 0, NULL, NULL);
++#endif
++
+ debug_level = 0;
+ #ifdef ENABLE_DEBUG
+ alloc = 0;
+Tylko w shfs-0.35/shfs/Linux-2.6: inode.c~
+diff -urp shfs-0.35./shfs/Linux-2.6/shfs_debug.h shfs-0.35/shfs/Linux-2.6/shfs_debug.h
+--- shfs-0.35./shfs/Linux-2.6/shfs_debug.h 2004-06-01 15:16:19.000000000 +0200
++++ shfs-0.35/shfs/Linux-2.6/shfs_debug.h 2008-03-09 03:20:49.748240839 +0100
+@@ -19,7 +19,7 @@ extern int debug_level;
+ extern unsigned long alloc;
+
+ static inline void *
+-__kmem_malloc_debug(char *s, kmem_cache_t *cache, int flags)
++__kmem_malloc_debug(char *s, struct kmem_cache *cache, int flags)
+ {
+ if (debug_level >= SHFS_ALLOC) {
+ void *x = kmem_cache_alloc(cache, flags);
+@@ -32,7 +32,7 @@ __kmem_malloc_debug(char *s, kmem_cache_
+ }
+
+ static inline void
+-__kmem_free_debug(char *s, kmem_cache_t *cache, void *p)
++__kmem_free_debug(char *s, struct kmem_cache *cache, void *p)
+ {
+ if (debug_level >= SHFS_ALLOC) {
+ VERBOSE("free (%s): %p\n", s, p);
+diff -urp shfs-0.35./shfs/Linux-2.6/shfs_fs.h shfs-0.35/shfs/Linux-2.6/shfs_fs.h
+--- shfs-0.35./shfs/Linux-2.6/shfs_fs.h 2008-03-09 02:36:50.429634000 +0100
++++ shfs-0.35/shfs/Linux-2.6/shfs_fs.h 2008-03-09 03:20:49.748240839 +0100
+@@ -73,10 +73,10 @@ int shfs_fill_cache(struct file*, void*,
+
+ /* shfs/fcache.c */
+ #include <linux/slab.h>
+-extern kmem_cache_t *file_cache;
+-extern kmem_cache_t *dir_head_cache;
+-extern kmem_cache_t *dir_entry_cache;
+-extern kmem_cache_t *dir_name_cache;
++extern struct kmem_cache *file_cache;
++extern struct kmem_cache *dir_head_cache;
++extern struct kmem_cache *dir_entry_cache;
++extern struct kmem_cache *dir_name_cache;
+ void fcache_init(void);
+ void fcache_finish(void);
+ int fcache_file_open(struct file*);
================================================================
More information about the pld-cvs-commit
mailing list