lkml.org 
[lkml]   [2012]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/12] thp: introduce khugepaged_prealloc_page and khugepaged_alloc_page
On Wed, 12 Sep 2012, Hugh Dickins wrote:
> > @@ -1825,6 +1825,7 @@ static bool khugepaged_prealloc_page(struct page **hpage, bool *wait)
> > return false;
> >
> > *wait = false;
> > + *hpage = NULL;
> > khugepaged_alloc_sleep();
> > } else if (*hpage) {
> > put_page(*hpage);
>
> The unshown line just below this is
>
> *hpage = NULL;
>
> I do wish you would take the "*hpage = NULL;" out of if and else blocks
> and place it once below both.

Hold on, I'm being unreasonable: that's an "else if", and I've no good
reason to request you to set *hpage = NULL when it's already NULL.
It would be okay if you did, but there's no reason for me to prefer it.

Hugh


\
 
 \ /
  Last update: 2012-09-13 09:21    [W:0.044 / U:29.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site