]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/thrash.c
h63xx: initial omap board support.
[linux-2.6-omap-h63xx.git] / mm / thrash.c
index 19e428ca8b034ccae8bb6c201d52197bf17a084e..c4c5205a9c35f82c2dc34b52b4b37a8b0a0ecc44 100644 (file)
@@ -24,7 +24,7 @@
 
 static DEFINE_SPINLOCK(swap_token_lock);
 struct mm_struct *swap_token_mm;
-unsigned int global_faults;
+static unsigned int global_faults;
 
 void grab_swap_token(void)
 {
@@ -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 >