Mika Kukkonen 7faaa5f0bf Bug in mm/thrash.c function grab_swap_token()
Following bug was uncovered by compiling with '-W' flag:

  CC      mm/thrash.o
mm/thrash.c: In function ‘grab_swap_token’:
mm/thrash.c:52: warning: comparison of unsigned expression < 0 is always false

Variable token_priority is unsigned, so decrementing first and then
checking the result does not work; fixed by reversing the test, patch
attached (compile tested only).

I am not sure if likely() makes much sense in this new situation, but
I'll let somebody else to make a decision on that.

Signed-off-by: Mika Kukkonen <mikukkon@iki.fi>
Cc: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-11 08:29:32 -07:00
..
2007-03-27 08:52:47 +02:00
2006-12-22 08:55:49 -08:00
2007-05-09 01:35:00 +00:00
2007-05-07 12:12:54 -07:00
2007-05-07 12:12:54 -07:00
2007-01-11 18:18:20 -08:00
2007-02-15 09:57:03 -08:00
2006-12-07 08:39:22 -08:00
2007-05-09 08:57:56 +02:00
2006-09-26 08:48:45 -07:00
2007-05-07 12:12:55 -07:00
2005-04-16 15:20:36 -07:00
2007-05-07 12:12:54 -07:00
2007-05-07 12:12:52 -07:00
2007-05-08 11:15:26 -07:00
2007-05-10 09:26:53 -07:00