Re: [PATCH v1 3/4] mm/memory_hotplug: Make __remove_section() never fail

From: David Hildenbrand
Date: Wed Apr 24 2019 - 02:54:32 EST


On 17.04.19 15:56, Oscar Salvador wrote:
> On Tue, 2019-04-09 at 12:01 +0200, David Hildenbrand wrote:
>> Let's just warn in case a section is not valid instead of failing to
>> remove somewhere in the middle of the process, returning an error
>> that
>> will be mostly ignored by callers.
>>
>> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
>> Cc: Oscar Salvador <osalvador@xxxxxxx>
>> Cc: Michal Hocko <mhocko@xxxxxxxx>
>> Cc: David Hildenbrand <david@xxxxxxxxxx>
>> Cc: Pavel Tatashin <pasha.tatashin@xxxxxxxxxx>
>> Cc: Qian Cai <cai@xxxxxx>
>> Cc: Wei Yang <richard.weiyang@xxxxxxxxx>
>> Cc: Arun KS <arunks@xxxxxxxxxxxxxx>
>> Cc: Mathieu Malaterre <malat@xxxxxxxxxx>
>> Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>
>
> Just a nit:
>
> I think this could be combined with patch#2.
> The only reason to fail in here is 1) !valid_section 2)
> !present_section.
> As I stated in patch#2, one cannot be without the other, so makes sense
> to rip present_section check from unregister_mem_section() as well.
> Then, you could combine both changelogs explaining the whole thing, and
> why we do not need the present_section check either.
>

If I have to resend the whole thing, I might do that. Otherwise we can
drop the present_section() based on your explanation later.

Thanks!

> But the change looks good to me:
>
> Reviewed-by: Oscar Salvador <osalvador@xxxxxxx>


--

Thanks,

David / dhildenb