mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 20:24:12 +08:00
zsmalloc: remove null check from destroy_handle_cache()
We can pass a NULL cache pointer to kmem_cache_destroy(), because it NULL-checks its argument now. Remove redundant test from destroy_handle_cache(). Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Acked-by: Minchan Kim <minchan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
b3e237f1f5
commit
cd10add00c
@ -288,8 +288,7 @@ static int create_handle_cache(struct zs_pool *pool)
|
||||
|
||||
static void destroy_handle_cache(struct zs_pool *pool)
|
||||
{
|
||||
if (pool->handle_cachep)
|
||||
kmem_cache_destroy(pool->handle_cachep);
|
||||
kmem_cache_destroy(pool->handle_cachep);
|
||||
}
|
||||
|
||||
static unsigned long alloc_handle(struct zs_pool *pool)
|
||||
|
Loading…
Reference in New Issue
Block a user