aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'mm/mlock.c')
-rw-r--r--mm/mlock.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/mlock.c b/mm/mlock.c
index d843bc9d32dd..206e86b98a03 100644
--- a/mm/mlock.c
+++ b/mm/mlock.c
@@ -277,7 +277,7 @@ static void __munlock_pagevec(struct pagevec *pvec, struct zone *zone)
277{ 277{
278 int i; 278 int i;
279 int nr = pagevec_count(pvec); 279 int nr = pagevec_count(pvec);
280 int delta_munlocked; 280 int delta_munlocked = -nr;
281 struct pagevec pvec_putback; 281 struct pagevec pvec_putback;
282 int pgrescued = 0; 282 int pgrescued = 0;
283 283
@@ -297,6 +297,8 @@ static void __munlock_pagevec(struct pagevec *pvec, struct zone *zone)
297 continue; 297 continue;
298 else 298 else
299 __munlock_isolation_failed(page); 299 __munlock_isolation_failed(page);
300 } else {
301 delta_munlocked++;
300 } 302 }
301 303
302 /* 304 /*
@@ -308,7 +310,6 @@ static void __munlock_pagevec(struct pagevec *pvec, struct zone *zone)
308 pagevec_add(&pvec_putback, pvec->pages[i]); 310 pagevec_add(&pvec_putback, pvec->pages[i]);
309 pvec->pages[i] = NULL; 311 pvec->pages[i] = NULL;
310 } 312 }
311 delta_munlocked = -nr + pagevec_count(&pvec_putback);
312 __mod_zone_page_state(zone, NR_MLOCK, delta_munlocked); 313 __mod_zone_page_state(zone, NR_MLOCK, delta_munlocked);
313 spin_unlock_irq(&zone->lru_lock); 314 spin_unlock_irq(&zone->lru_lock);
314 315