Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320789
b: refs/heads/master
c: 2a13515
h: refs/heads/master
i:
  320787: dd4ee3c
v: v3
  • Loading branch information
KOSAKI Motohiro authored and Linus Torvalds committed Aug 1, 2012
1 parent 514ab97 commit 5719dad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3d3727cdb07ff17ddc3c551ef8d03d37b60a0372
refs/heads/master: 2a13515c398bbe471bf64519ada87fd708152ced
9 changes: 6 additions & 3 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1158,8 +1158,10 @@ void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp)
to_drain = pcp->batch;
else
to_drain = pcp->count;
free_pcppages_bulk(zone, to_drain, pcp);
pcp->count -= to_drain;
if (to_drain > 0) {
free_pcppages_bulk(zone, to_drain, pcp);
pcp->count -= to_drain;
}
local_irq_restore(flags);
}
#endif
Expand Down Expand Up @@ -3915,7 +3917,8 @@ static int __zone_pcp_update(void *data)
pcp = &pset->pcp;

local_irq_save(flags);
free_pcppages_bulk(zone, pcp->count, pcp);
if (pcp->count > 0)
free_pcppages_bulk(zone, pcp->count, pcp);
setup_pageset(pset, batch);
local_irq_restore(flags);
}
Expand Down

0 comments on commit 5719dad

Please sign in to comment.