percpu: indent the population block in pcpu_alloc()

The next patch will conditionalize the population block in
pcpu_alloc() which will end up making a rather large indentation
change obfuscating the actual logic change.  This patch puts the block
under "if (true)" so that the next patch can avoid indentation
changes.  The defintions of the local variables which are used only in
the block are moved into the block.

This patch is purely cosmetic.

Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
Tejun Heo
2014-09-02 14:46:04 -04:00
parent a16037c8df
commit e04d320838

View File

@@ -742,7 +742,6 @@ static void __percpu *pcpu_alloc(size_t size, size_t align, bool reserved)
struct pcpu_chunk *chunk;
const char *err;
int slot, off, new_alloc, cpu, ret;
int page_start, page_end, rs, re;
unsigned long flags;
void __percpu *ptr;
@@ -847,7 +846,11 @@ area_found:
spin_unlock_irqrestore(&pcpu_lock, flags);
/* populate if not all pages are already there */
if (true) {
int page_start, page_end, rs, re;
mutex_lock(&pcpu_alloc_mutex);
page_start = PFN_DOWN(off);
page_end = PFN_UP(off + size);
@@ -868,6 +871,7 @@ area_found:
}
mutex_unlock(&pcpu_alloc_mutex);
}
/* clear the areas and return address relative to base address */
for_each_possible_cpu(cpu)