Re: [PATCH] mm: fix dubious code in __count_immobile_pages()

From: Namhyung Kim
Date: Thu Feb 17 2011 - 22:00:41 EST


2011-02-18 (ê), 11:26 +0900, Minchan Kim:
> On Fri, Feb 18, 2011 at 10:46 AM, Namhyung Kim <namhyung@xxxxxxxxx> wrote:
> > When pfn_valid_within() failed 'iter' was incremented twice.
> >
> > Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxx>
> > Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
> Reviewed-by: Minchan Kim <minchan.kim@xxxxxxxxx>
>
> Nitpick.
>
> I am not sure it's best. I don't like below trick.
> iter += (1 << page_order(page)) - 1;
>
> So we can change for loop with while as removing -1 trick of PageBuddy.
> But if you don't like it, I don't mind it. :)
>
> Thanks!
>

Hi Minchan,

Either is fine to me. But I think current code would be shorter.


--
Regards,
Namhyung Kim


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/