diff options
-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 9ef9071f99b..c4c5205a9c3 100644 --- a/mm/thrash.c +++ b/mm/thrash.c @@ -48,9 +48,8 @@ void grab_swap_token(void) if (current_interval < current->mm->last_interval) current->mm->token_priority++; else { - current->mm->token_priority--; - if (unlikely(current->mm->token_priority < 0)) - current->mm->token_priority = 0; + if (likely(current->mm->token_priority > 0)) + current->mm->token_priority--; } /* Check if we deserve the token */ if (current->mm->token_priority > |