* [PATCH] mm/slab.c: clean code by removing redundant if condition
@ 2020-09-15 23:03 mateusznosek0
0 siblings, 0 replies; only message in thread
From: mateusznosek0 @ 2020-09-15 23:03 UTC (permalink / raw)
To: linux-mm, linux-kernel
Cc: Mateusz Nosek, cl, penberg, rientjes, iamjoonsoo.kim, akpm
From: Mateusz Nosek <mateusznosek0@gmail.com>
The removed code was unnecessary and changed nothing in the flow, since
in case of returning NULL by 'kmem_cache_alloc_node' returning 'freelist'
from the function in question is the same as returning NULL.
Signed-off-by: Mateusz Nosek <mateusznosek0@gmail.com>
---
mm/slab.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/mm/slab.c b/mm/slab.c
index 3160dff6fd76..8f2fd224c1f0 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2301,8 +2301,6 @@ static void *alloc_slabmgmt(struct kmem_cache *cachep,
/* Slab management obj is off-slab. */
freelist = kmem_cache_alloc_node(cachep->freelist_cache,
local_flags, nodeid);
- if (!freelist)
- return NULL;
} else {
/* We will use last bytes at the slab for freelist */
freelist = addr + (PAGE_SIZE << cachep->gfporder) -
--
2.20.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-15 23:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-15 23:03 [PATCH] mm/slab.c: clean code by removing redundant if condition mateusznosek0
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox