mirror of
https://github.com/genesi/linux-legacy.git
synced 2026-07-08 17:56:55 +00:00
page allocator: update NR_FREE_PAGES only when necessary
commit 6ccf80eb15ccaca4d3f1ab5162b9ded5eecd9971 upstream.
commit f2260e6b (page allocator: update NR_FREE_PAGES only as necessary)
made one minor regression. if __rmqueue() was failed, NR_FREE_PAGES stat
go wrong. this patch fixes it.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Reported-by: Huang Shijie <shijie8@gmail.com>
Reviewed-by: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
48dd705726
commit
841e7fc166
@@ -1167,10 +1167,10 @@ again:
|
||||
}
|
||||
spin_lock_irqsave(&zone->lock, flags);
|
||||
page = __rmqueue(zone, order, migratetype);
|
||||
__mod_zone_page_state(zone, NR_FREE_PAGES, -(1 << order));
|
||||
spin_unlock(&zone->lock);
|
||||
if (!page)
|
||||
goto failed;
|
||||
__mod_zone_page_state(zone, NR_FREE_PAGES, -(1 << order));
|
||||
}
|
||||
|
||||
__count_zone_vm_events(PGALLOC, zone, 1 << order);
|
||||
|
||||
Reference in New Issue
Block a user