mm/slub: remove the check for NULL kmalloc_caches
authorHyunmin Lee <hyunminlr@gmail.com>
Wed, 24 Apr 2024 14:04:22 +0000 (23:04 +0900)
committerVlastimil Babka <vbabka@suse.cz>
Thu, 2 May 2024 14:09:40 +0000 (16:09 +0200)
commit7338999ca3468404f547b1540211114cbdb26d06
tree60e5a85a517f04d877b9d08925f40bd7dda39863
parent306c4ac9896b07b8872293eb224058ff83f81fac
mm/slub: remove the check for NULL kmalloc_caches

If the same size kmalloc cache already exists, it should not be created
again. So there is the check for NULL kmalloc_caches before calling the
kmalloc creation function. However, new_kmalloc_cache() itself checks NULL
kmalloc_cahces before cache creation. Therefore, the NULL check is not
necessary in this function.

Signed-off-by: Hyunmin Lee <hyunminlr@gmail.com>
Co-developed-by: Jeungwoo Yoo <casionwoo@gmail.com>
Signed-off-by: Jeungwoo Yoo <casionwoo@gmail.com>
Co-developed-by: Sangyun Kim <sangyun.kim@snu.ac.kr>
Signed-off-by: Sangyun Kim <sangyun.kim@snu.ac.kr>
Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Reviewed-by: Christoph Lameter <cl@linux.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
mm/slab_common.c