diff options
-rw-r--r-- | include/linux/zpool.h | 6 | ||||
-rw-r--r-- | include/linux/zsmalloc.h | 2 | ||||
-rw-r--r-- | mm/zbud.c | 2 | ||||
-rw-r--r-- | mm/zpool.c | 4 | ||||
-rw-r--r-- | mm/zsmalloc.c | 10 |
5 files changed, 13 insertions, 11 deletions
diff --git a/include/linux/zpool.h b/include/linux/zpool.h index 1f405bee3cd5..2e97b7707dff 100644 --- a/include/linux/zpool.h +++ b/include/linux/zpool.h | |||
@@ -38,7 +38,7 @@ enum zpool_mapmode { | |||
38 | 38 | ||
39 | bool zpool_has_pool(char *type); | 39 | bool zpool_has_pool(char *type); |
40 | 40 | ||
41 | struct zpool *zpool_create_pool(char *type, char *name, | 41 | struct zpool *zpool_create_pool(const char *type, const char *name, |
42 | gfp_t gfp, const struct zpool_ops *ops); | 42 | gfp_t gfp, const struct zpool_ops *ops); |
43 | 43 | ||
44 | const char *zpool_get_type(struct zpool *pool); | 44 | const char *zpool_get_type(struct zpool *pool); |
@@ -83,7 +83,9 @@ struct zpool_driver { | |||
83 | atomic_t refcount; | 83 | atomic_t refcount; |
84 | struct list_head list; | 84 | struct list_head list; |
85 | 85 | ||
86 | void *(*create)(char *name, gfp_t gfp, const struct zpool_ops *ops, | 86 | void *(*create)(const char *name, |
87 | gfp_t gfp, | ||
88 | const struct zpool_ops *ops, | ||
87 | struct zpool *zpool); | 89 | struct zpool *zpool); |
88 | void (*destroy)(void *pool); | 90 | void (*destroy)(void *pool); |
89 | 91 | ||
diff --git a/include/linux/zsmalloc.h b/include/linux/zsmalloc.h index 6398dfae53f1..34eb16098a33 100644 --- a/include/linux/zsmalloc.h +++ b/include/linux/zsmalloc.h | |||
@@ -41,7 +41,7 @@ struct zs_pool_stats { | |||
41 | 41 | ||
42 | struct zs_pool; | 42 | struct zs_pool; |
43 | 43 | ||
44 | struct zs_pool *zs_create_pool(char *name, gfp_t flags); | 44 | struct zs_pool *zs_create_pool(const char *name, gfp_t flags); |
45 | void zs_destroy_pool(struct zs_pool *pool); | 45 | void zs_destroy_pool(struct zs_pool *pool); |
46 | 46 | ||
47 | unsigned long zs_malloc(struct zs_pool *pool, size_t size); | 47 | unsigned long zs_malloc(struct zs_pool *pool, size_t size); |
@@ -137,7 +137,7 @@ static const struct zbud_ops zbud_zpool_ops = { | |||
137 | .evict = zbud_zpool_evict | 137 | .evict = zbud_zpool_evict |
138 | }; | 138 | }; |
139 | 139 | ||
140 | static void *zbud_zpool_create(char *name, gfp_t gfp, | 140 | static void *zbud_zpool_create(const char *name, gfp_t gfp, |
141 | const struct zpool_ops *zpool_ops, | 141 | const struct zpool_ops *zpool_ops, |
142 | struct zpool *zpool) | 142 | struct zpool *zpool) |
143 | { | 143 | { |
diff --git a/mm/zpool.c b/mm/zpool.c index 13f524dcf215..fd3ff719c32c 100644 --- a/mm/zpool.c +++ b/mm/zpool.c | |||
@@ -72,7 +72,7 @@ int zpool_unregister_driver(struct zpool_driver *driver) | |||
72 | EXPORT_SYMBOL(zpool_unregister_driver); | 72 | EXPORT_SYMBOL(zpool_unregister_driver); |
73 | 73 | ||
74 | /* this assumes @type is null-terminated. */ | 74 | /* this assumes @type is null-terminated. */ |
75 | static struct zpool_driver *zpool_get_driver(char *type) | 75 | static struct zpool_driver *zpool_get_driver(const char *type) |
76 | { | 76 | { |
77 | struct zpool_driver *driver; | 77 | struct zpool_driver *driver; |
78 | 78 | ||
@@ -150,7 +150,7 @@ EXPORT_SYMBOL(zpool_has_pool); | |||
150 | * | 150 | * |
151 | * Returns: New zpool on success, NULL on failure. | 151 | * Returns: New zpool on success, NULL on failure. |
152 | */ | 152 | */ |
153 | struct zpool *zpool_create_pool(char *type, char *name, gfp_t gfp, | 153 | struct zpool *zpool_create_pool(const char *type, const char *name, gfp_t gfp, |
154 | const struct zpool_ops *ops) | 154 | const struct zpool_ops *ops) |
155 | { | 155 | { |
156 | struct zpool_driver *driver; | 156 | struct zpool_driver *driver; |
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index f135b1b6fcdc..8b8e0dac0a2a 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c | |||
@@ -237,7 +237,7 @@ struct link_free { | |||
237 | }; | 237 | }; |
238 | 238 | ||
239 | struct zs_pool { | 239 | struct zs_pool { |
240 | char *name; | 240 | const char *name; |
241 | 241 | ||
242 | struct size_class **size_class; | 242 | struct size_class **size_class; |
243 | struct kmem_cache *handle_cachep; | 243 | struct kmem_cache *handle_cachep; |
@@ -311,7 +311,7 @@ static void record_obj(unsigned long handle, unsigned long obj) | |||
311 | 311 | ||
312 | #ifdef CONFIG_ZPOOL | 312 | #ifdef CONFIG_ZPOOL |
313 | 313 | ||
314 | static void *zs_zpool_create(char *name, gfp_t gfp, | 314 | static void *zs_zpool_create(const char *name, gfp_t gfp, |
315 | const struct zpool_ops *zpool_ops, | 315 | const struct zpool_ops *zpool_ops, |
316 | struct zpool *zpool) | 316 | struct zpool *zpool) |
317 | { | 317 | { |
@@ -548,7 +548,7 @@ static const struct file_operations zs_stat_size_ops = { | |||
548 | .release = single_release, | 548 | .release = single_release, |
549 | }; | 549 | }; |
550 | 550 | ||
551 | static int zs_pool_stat_create(char *name, struct zs_pool *pool) | 551 | static int zs_pool_stat_create(const char *name, struct zs_pool *pool) |
552 | { | 552 | { |
553 | struct dentry *entry; | 553 | struct dentry *entry; |
554 | 554 | ||
@@ -588,7 +588,7 @@ static void __exit zs_stat_exit(void) | |||
588 | { | 588 | { |
589 | } | 589 | } |
590 | 590 | ||
591 | static inline int zs_pool_stat_create(char *name, struct zs_pool *pool) | 591 | static inline int zs_pool_stat_create(const char *name, struct zs_pool *pool) |
592 | { | 592 | { |
593 | return 0; | 593 | return 0; |
594 | } | 594 | } |
@@ -1866,7 +1866,7 @@ static int zs_register_shrinker(struct zs_pool *pool) | |||
1866 | * On success, a pointer to the newly created pool is returned, | 1866 | * On success, a pointer to the newly created pool is returned, |
1867 | * otherwise NULL. | 1867 | * otherwise NULL. |
1868 | */ | 1868 | */ |
1869 | struct zs_pool *zs_create_pool(char *name, gfp_t flags) | 1869 | struct zs_pool *zs_create_pool(const char *name, gfp_t flags) |
1870 | { | 1870 | { |
1871 | int i; | 1871 | int i; |
1872 | struct zs_pool *pool; | 1872 | struct zs_pool *pool; |