Re: [PATCH 2/8] mm/huge: avoid big else branch in zap_huge_pmd()

From: Qi Zheng

Date: Wed Mar 18 2026 - 23:27:26 EST




On 3/19/26 4:39 AM, Lorenzo Stoakes (Oracle) wrote:
We don't need to have an extra level of indentation, we can simply exit
early in the first two branches.

Signed-off-by: Lorenzo Stoakes (Oracle) <ljs@xxxxxxxxxx>
---
mm/huge_memory.c | 87 +++++++++++++++++++++++++-----------------------
1 file changed, 45 insertions(+), 42 deletions(-)


The code here isn't too complex, otherwise we can introduce the
function like do_zap_pte_range().

Acked-by: Qi Zheng <zhengqi.arch@xxxxxxxxxxxxx>