Skip to content

Commit

Permalink
Merge branch 'for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/tj/percpu into for-3.17/core

Merge the percpu_ref changes from Tejun, he says they are stable now.
  • Loading branch information
axboe committed Jul 1, 2014
2 parents 4c83445 + 2d72278 commit 17737d3
Show file tree
Hide file tree
Showing 11 changed files with 834 additions and 822 deletions.
3 changes: 1 addition & 2 deletions arch/x86/include/asm/percpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,9 @@
* Compared to the generic __my_cpu_offset version, the following
* saves one instruction and avoids clobbering a temp register.
*/
#define raw_cpu_ptr(ptr) \
#define arch_raw_cpu_ptr(ptr) \
({ \
unsigned long tcp_ptr__; \
__verify_pcpu_ptr(ptr); \
asm volatile("add " __percpu_arg(1) ", %0" \
: "=r" (tcp_ptr__) \
: "m" (this_cpu_off), "0" (ptr)); \
Expand Down
4 changes: 3 additions & 1 deletion drivers/target/target_core_tpg.c
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ int core_tpg_add_lun(

ret = core_dev_export(dev, tpg, lun);
if (ret < 0) {
percpu_ref_cancel_init(&lun->lun_ref);
percpu_ref_exit(&lun->lun_ref);
return ret;
}

Expand Down Expand Up @@ -880,5 +880,7 @@ int core_tpg_post_dellun(
lun->lun_status = TRANSPORT_LUN_STATUS_FREE;
spin_unlock(&tpg->tpg_lun_lock);

percpu_ref_exit(&lun->lun_ref);

return 0;
}
6 changes: 4 additions & 2 deletions fs/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,8 @@ static void free_ioctx(struct work_struct *work)

aio_free_ring(ctx);
free_percpu(ctx->cpu);
percpu_ref_exit(&ctx->reqs);
percpu_ref_exit(&ctx->users);
kmem_cache_free(kioctx_cachep, ctx);
}

Expand Down Expand Up @@ -715,8 +717,8 @@ static struct kioctx *ioctx_alloc(unsigned nr_events)
err:
mutex_unlock(&ctx->ring_lock);
free_percpu(ctx->cpu);
free_percpu(ctx->reqs.pcpu_count);
free_percpu(ctx->users.pcpu_count);
percpu_ref_exit(&ctx->reqs);
percpu_ref_exit(&ctx->users);
kmem_cache_free(kioctx_cachep, ctx);
pr_debug("error allocating ioctx %d\n", err);
return ERR_PTR(err);
Expand Down
Loading

0 comments on commit 17737d3

Please sign in to comment.