]> git.baikalelectronics.ru Git - kernel.git/commit
buddy: clarify comments describing buddy merge
authorAndy Whitcroft <apw@shadowen.org>
Thu, 24 Jul 2008 04:27:11 +0000 (21:27 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Jul 2008 17:47:15 +0000 (10:47 -0700)
commit54eaeb8526910dbd32f0161170ae1c117e85ea98
treebfbb2ee1919bb2bbd0e5158103c7382af73da31d
parent596e302b5ee70c40cb2f34dd8ecb9b4ae658d6e1
buddy: clarify comments describing buddy merge

In __free_one_page(), the comment "Move the buddy up one level" appears
attached to the break and by implication when the break is taken we are
moving it up one level:

if (!page_is_buddy(page, buddy, order))
break;          /* Move the buddy up one level. */

In reality the inverse is true, we break out when we can no longer merge
this page with its buddy.  Looking back into pre-history (into the full
git history) it appears that these two lines accidentally got joined as
part of another change.

Move the comment down where it belongs below the if and clarify its
language.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c