Re: [RFC PATCH for 4.21 04/16] mm: Introduce vm_map_user_ram, vm_unmap_user_ram

From: Sergey Senozhatsky
Date: Wed Oct 17 2018 - 11:34:25 EST


On (10/17/18 11:04), Mathieu Desnoyers wrote:
> >>
> >>> if (WARN_ON(x))
> >>> return;
> >>
> >> Given that this somewhat MM-related, I'd may be say VM_WARN_ON().
>
> I notice that VM_WARN_ON() casts the result of WARN_ON() to (void), so it
> cannot be used in a if () statement.
>
> VM_WARN_ON() will only warn if CONFIG_DEBUG_VM is set.
>
> Is it really what we want ?

Oh, indeed... Sorry, I forgot that they cast WANR_ON() return to void.
Let's do what Steven suggested.

-ss