提交 d3689d76 编写于 作者: B Barry Naujok 提交者: Niv Sardi

[XFS] kmem_free and kmem_realloc to use const void *

SGI-PV: 981498
SGI-Modid: xfs-linux-melb:xfs-kern:31212a
Signed-off-by: NBarry Naujok <bnaujok@sgi.com>
Signed-off-by: NChristoph Hellwig <hch@infradead.org>
上级 189f4bf2
...@@ -90,7 +90,7 @@ kmem_zalloc_greedy(size_t *size, size_t minsize, size_t maxsize, ...@@ -90,7 +90,7 @@ kmem_zalloc_greedy(size_t *size, size_t minsize, size_t maxsize,
} }
void void
kmem_free(void *ptr) kmem_free(const void *ptr)
{ {
if (!is_vmalloc_addr(ptr)) { if (!is_vmalloc_addr(ptr)) {
kfree(ptr); kfree(ptr);
...@@ -100,7 +100,7 @@ kmem_free(void *ptr) ...@@ -100,7 +100,7 @@ kmem_free(void *ptr)
} }
void * void *
kmem_realloc(void *ptr, size_t newsize, size_t oldsize, kmem_realloc(const void *ptr, size_t newsize, size_t oldsize,
unsigned int __nocast flags) unsigned int __nocast flags)
{ {
void *new; void *new;
......
...@@ -57,8 +57,8 @@ kmem_flags_convert(unsigned int __nocast flags) ...@@ -57,8 +57,8 @@ kmem_flags_convert(unsigned int __nocast flags)
extern void *kmem_alloc(size_t, unsigned int __nocast); extern void *kmem_alloc(size_t, unsigned int __nocast);
extern void *kmem_zalloc(size_t, unsigned int __nocast); extern void *kmem_zalloc(size_t, unsigned int __nocast);
extern void *kmem_zalloc_greedy(size_t *, size_t, size_t, unsigned int __nocast); extern void *kmem_zalloc_greedy(size_t *, size_t, size_t, unsigned int __nocast);
extern void *kmem_realloc(void *, size_t, size_t, unsigned int __nocast); extern void *kmem_realloc(const void *, size_t, size_t, unsigned int __nocast);
extern void kmem_free(void *); extern void kmem_free(const void *);
/* /*
* Zone interfaces * Zone interfaces
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册