瀏覽代碼

slab: Move kmalloc related function defs

Move these functions higher up in slab.h so that they are grouped with other
generic kmalloc related definitions.

Acked-by: Glauber Costa <glommer@parallels.com>
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Christoph Lameter 12 年之前
父節點
當前提交
3450466734
共有 1 個文件被更改,包括 9 次插入9 次删除
  1. 9 9
      include/linux/slab.h

+ 9 - 9
include/linux/slab.h

@@ -147,6 +147,15 @@ void kmem_cache_free(struct kmem_cache *, void *);
 		sizeof(struct __struct), __alignof__(struct __struct),\
 		sizeof(struct __struct), __alignof__(struct __struct),\
 		(__flags), NULL)
 		(__flags), NULL)
 
 
+/*
+ * Common kmalloc functions provided by all allocators
+ */
+void * __must_check __krealloc(const void *, size_t, gfp_t);
+void * __must_check krealloc(const void *, size_t, gfp_t);
+void kfree(const void *);
+void kzfree(const void *);
+size_t ksize(const void *);
+
 /*
 /*
  * The largest kmalloc size supported by the slab allocators is
  * The largest kmalloc size supported by the slab allocators is
  * 32 megabyte (2^25) or the maximum allocatable page order if that is
  * 32 megabyte (2^25) or the maximum allocatable page order if that is
@@ -224,15 +233,6 @@ struct seq_file;
 int cache_show(struct kmem_cache *s, struct seq_file *m);
 int cache_show(struct kmem_cache *s, struct seq_file *m);
 void print_slabinfo_header(struct seq_file *m);
 void print_slabinfo_header(struct seq_file *m);
 
 
-/*
- * Common kmalloc functions provided by all allocators
- */
-void * __must_check __krealloc(const void *, size_t, gfp_t);
-void * __must_check krealloc(const void *, size_t, gfp_t);
-void kfree(const void *);
-void kzfree(const void *);
-size_t ksize(const void *);
-
 /*
 /*
  * Allocator specific definitions. These are mainly used to establish optimized
  * Allocator specific definitions. These are mainly used to establish optimized
  * ways to convert kmalloc() calls to kmem_cache_alloc() invocations by
  * ways to convert kmalloc() calls to kmem_cache_alloc() invocations by