diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/thrash.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/mm/thrash.c b/mm/thrash.c index 9ef9071f99bc..c4c5205a9c35 100644 --- a/mm/thrash.c +++ b/mm/thrash.c | |||
@@ -48,9 +48,8 @@ void grab_swap_token(void) | |||
48 | if (current_interval < current->mm->last_interval) | 48 | if (current_interval < current->mm->last_interval) |
49 | current->mm->token_priority++; | 49 | current->mm->token_priority++; |
50 | else { | 50 | else { |
51 | current->mm->token_priority--; | 51 | if (likely(current->mm->token_priority > 0)) |
52 | if (unlikely(current->mm->token_priority < 0)) | 52 | current->mm->token_priority--; |
53 | current->mm->token_priority = 0; | ||
54 | } | 53 | } |
55 | /* Check if we deserve the token */ | 54 | /* Check if we deserve the token */ |
56 | if (current->mm->token_priority > | 55 | if (current->mm->token_priority > |