percpu-refcount: add @gfp to percpu_ref_init()
Percpu allocator now supports allocation mask. Add @gfp to percpu_ref_init() so that !GFP_KERNEL allocation masks can be used with percpu_refs too. This patch doesn't make any functional difference. v2: blk-mq conversion was missing. Updated. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Kent Overstreet <koverstreet@google.com> Cc: Benjamin LaHaise <bcrl@kvack.org> Cc: Li Zefan <lizefan@huawei.com> Cc: Nicholas A. Bellinger <nab@linux-iscsi.org> Cc: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
4
fs/aio.c
4
fs/aio.c
@@ -666,10 +666,10 @@ static struct kioctx *ioctx_alloc(unsigned nr_events)
|
||||
|
||||
INIT_LIST_HEAD(&ctx->active_reqs);
|
||||
|
||||
if (percpu_ref_init(&ctx->users, free_ioctx_users))
|
||||
if (percpu_ref_init(&ctx->users, free_ioctx_users, GFP_KERNEL))
|
||||
goto err;
|
||||
|
||||
if (percpu_ref_init(&ctx->reqs, free_ioctx_reqs))
|
||||
if (percpu_ref_init(&ctx->reqs, free_ioctx_reqs, GFP_KERNEL))
|
||||
goto err;
|
||||
|
||||
ctx->cpu = alloc_percpu(struct kioctx_cpu);
|
||||
|
Reference in New Issue
Block a user