]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/page_alloc: dedupe some memcg uncharging logic
authorBrendan Jackman <jackmanb@google.com>
Wed, 8 Nov 2023 16:49:20 +0000 (16:49 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 20 Nov 2023 21:16:32 +0000 (13:16 -0800)
commit32a2e62ba7343423d6626109ea9532368458dd49
tree16922b0673a1f85837aa7daf9d41b99835a2e609
parent229989a6cf8959772833b5e667ad7ee31cbdb8d8
mm/page_alloc: dedupe some memcg uncharging logic

The duplication makes it seem like some work is required before uncharging
in the !PageHWPoison case.  But it isn't, so we can simplify the code a
little.

Note the PageMemcgKmem check is redundant, but I've left it in as it
avoids an unnecessary function call.

Link: https://lkml.kernel.org/r/20231108164920.3401565-1-jackmanb@google.com
Signed-off-by: Brendan Jackman <jackmanb@google.com>
Reviewed-by: Yosry Ahmed <yosryahmed@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Shakeel Butt <shakeelb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_alloc.c