lkml.org 
[lkml]   [2018]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v9 06/24] mm: make pte_unmap_same compatible with SPF
From
Date


On 28/03/2018 12:20, David Rientjes wrote:
> On Wed, 28 Mar 2018, Laurent Dufour wrote:
>
>>>> @@ -2913,7 +2921,8 @@ int do_swap_page(struct vm_fault *vmf)
>>>> int exclusive = 0;
>>>> int ret = 0;
>>>
>>> Initialization is now unneeded.
>>
>> I'm sorry, what "initialization" are you talking about here ?
>>
>
> The initialization of the ret variable.
>
> @@ -2913,7 +2921,8 @@ int do_swap_page(struct vm_fault *vmf)
> int exclusive = 0;
> int ret = 0;
>
> - if (!pte_unmap_same(vma->vm_mm, vmf->pmd, vmf->pte, vmf->orig_pte))
> + ret = pte_unmap_same(vmf);
> + if (ret)
> goto out;
>
> entry = pte_to_swp_entry(vmf->orig_pte);
>
> "ret" is immediately set to the return value of pte_unmap_same(), so there
> is no need to initialize it to 0.

Sorry, I missed that. I'll remove this initialization.

Thanks,
Laurent.

\
 
 \ /
  Last update: 2018-03-28 12:43    [W:0.092 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site