Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185011
b: refs/heads/master
c: 22b737f
h: refs/heads/master
i:
  185009: 0597840
  185007: 1221306
v: v3
  • Loading branch information
WANG Cong authored and Tejun Heo committed Dec 8, 2009
1 parent e05af1b commit 6819f04
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 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: 85438592f179c126ad4cb9a280046d4f0a501e6d
refs/heads/master: 22b737f4c75197372d64afc6ed1bccd58c00e549
18 changes: 8 additions & 10 deletions trunk/mm/percpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -886,11 +886,10 @@ static void pcpu_depopulate_chunk(struct pcpu_chunk *chunk, int off, int size)
int rs, re;

/* quick path, check whether it's empty already */
pcpu_for_each_unpop_region(chunk, rs, re, page_start, page_end) {
if (rs == page_start && re == page_end)
return;
break;
}
rs = page_start;
pcpu_next_unpop(chunk, &rs, &re, page_end);
if (rs == page_start && re == page_end)
return;

/* immutable chunks can't be depopulated */
WARN_ON(chunk->immutable);
Expand Down Expand Up @@ -941,11 +940,10 @@ static int pcpu_populate_chunk(struct pcpu_chunk *chunk, int off, int size)
int rs, re, rc;

/* quick path, check whether all pages are already there */
pcpu_for_each_pop_region(chunk, rs, re, page_start, page_end) {
if (rs == page_start && re == page_end)
goto clear;
break;
}
rs = page_start;
pcpu_next_pop(chunk, &rs, &re, page_end);
if (rs == page_start && re == page_end)
goto clear;

/* need to allocate and map pages, this chunk can't be immutable */
WARN_ON(chunk->immutable);
Expand Down

0 comments on commit 6819f04

Please sign in to comment.