From: Joonsoo Kim Date: Wed, 11 Sep 2013 21:21:00 +0000 (-0700) Subject: mm, hugetlb: fix and clean-up node iteration code to alloc or free X-Git-Tag: v3.12-rc1~52^2~241 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2261026825ed34066b24069359d118098bb1876;p=pandora-kernel.git mm, hugetlb: fix and clean-up node iteration code to alloc or free Current node iteration code have a minor problem which do one more node rotation if we can't succeed to allocate. For example, if we start to allocate at node 0, we stop to iterate at node 0. Then we start to allocate at node 1 for next allocation. I introduce new macros "for_each_node_mask_to_[alloc|free]" and fix and clean-up node iteration code to alloc or free. This makes code more understandable. Signed-off-by: Joonsoo Kim Reviewed-by: Aneesh Kumar K.V Acked-by: Hillf Danton Cc: Michal Hocko Cc: Naoya Horiguchi Cc: Wanpeng Li Cc: Rik van Riel Cc: Mel Gorman Cc: "Aneesh Kumar K.V" Cc: KAMEZAWA Hiroyuki Cc: Hugh Dickins Cc: Davidlohr Bueso Cc: David Gibson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed