diff options
-rw-r--r-- | mm/percpu.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/percpu.c b/mm/percpu.c index 202e104df8a..63e24fb4387 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -473,9 +473,11 @@ static int pcpu_alloc_area(struct pcpu_chunk *chunk, int size, int align) * uncommon for percpu allocations. */ if (head && (head < sizeof(int) || !(p[-1] & 1))) { + *p = off += head; if (p[-1] & 1) chunk->free_size -= head; - *p = off += head; + else + max_contig = max(*p - p[-1], max_contig); this_size -= head; head = 0; } |