From 7faaa5f0bf4db6ac4908038e2139adc46c165ff4 Mon Sep 17 00:00:00 2001 From: Mika Kukkonen Date: Thu, 10 May 2007 22:22:17 -0700 Subject: [PATCH] Bug in mm/thrash.c function grab_swap_token() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-format-patch failed