Re: [PATCH] mm/vmscan.c: 'lru' may be used without initializedafter the patch "3abf380..." in next-20130607 tree

From: Andrew Morton
Date: Wed Jun 19 2013 - 03:10:50 EST


On Wed, 19 Jun 2013 14:55:13 +0800 Chen Gang <gang.chen@xxxxxxxxxxx> wrote:

>
> 'lru' may be used without initialized, so need regressing part of the
> related patch.
>
> The related patch:
> "3abf380 mm: remove lru parameter from __lru_cache_add and lru_cache_add_lru"
>
> ...
>
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -595,6 +595,7 @@ redo:
> * unevictable page on [in]active list.
> * We know how to handle that.
> */
> + lru = !!TestClearPageActive(page) + page_lru_base_type(page);
> lru_cache_add(page);
> } else {
> /*

That looks right. Why the heck didn't gcc-4.4.4 (at least) warn about it?
--
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/