Re: [PATCH] fork: Use helper function mapping_allow_writable() in dup_mmap()

From: linmiaohe
Date: Tue Sep 15 2020 - 05:25:43 EST


Eric W. Biederman <ebiederm@xxxxxxxxxxxx> wrote:
> linmiaohe <linmiaohe@xxxxxxxxxx> writes:
>> Eric W. Biederman <ebiederm@xxxxxxxxxxxx> wrote:
>>> Miaohe Lin <linmiaohe@xxxxxxxxxx> writes:
>>>
>>>> Use helper function mapping_allow_writable() to atomic_inc
>>>> i_mmap_writable.
>>>
>>>Why?
>>>
>>
>> Because I think it's better to use the wrapper function instead of the
>> open hard code.
>
>My point is there is no context in this commit message.
>
>What makes it better to use the wrapper function?
>What makes the wrapper function the appropriate function to use?
>Why just this location?
>Why wasn't this change made when the wrapper function was introduced?
>
>I could probably read through the code and figure these things out but the description of the change should really include these things.
>
>Eric

I see. Many thanks for your detailed explaination. :)