]> git.baikalelectronics.ru Git - kernel.git/commit
mm: page_alloc: simplify drain_zone_pages by using min()
authorMichal Nazarewicz <mina86@mina86.com>
Wed, 6 Aug 2014 23:05:15 +0000 (16:05 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 7 Aug 2014 01:01:16 +0000 (18:01 -0700)
commitdb0ee39db659b48f6aee4628e4283018bc998b4c
tree0a70ae16ee1b68e4187da2471793a78a8cf6320b
parente4b1d56d128551037dcee60bac9bda2ae9a18853
mm: page_alloc: simplify drain_zone_pages by using min()

Instead of open-coding getting minimal value of two, just use min macro.
That is why it is there for.  While changing the function also change
type of batch local variable to match type of per_cpu_pages::batch
(which is int).

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c