diff options
Diffstat (limited to 'fs/aio.c')
-rw-r--r-- | fs/aio.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -75,7 +75,7 @@ static int __init aio_setup(void) | |||
75 | kiocb_cachep = KMEM_CACHE(kiocb, SLAB_HWCACHE_ALIGN|SLAB_PANIC); | 75 | kiocb_cachep = KMEM_CACHE(kiocb, SLAB_HWCACHE_ALIGN|SLAB_PANIC); |
76 | kioctx_cachep = KMEM_CACHE(kioctx,SLAB_HWCACHE_ALIGN|SLAB_PANIC); | 76 | kioctx_cachep = KMEM_CACHE(kioctx,SLAB_HWCACHE_ALIGN|SLAB_PANIC); |
77 | 77 | ||
78 | aio_wq = create_workqueue("aio"); | 78 | aio_wq = alloc_workqueue("aio", 0, 1); /* used to limit concurrency */ |
79 | BUG_ON(!aio_wq); | 79 | BUG_ON(!aio_wq); |
80 | 80 | ||
81 | pr_debug("aio_setup: sizeof(struct page) = %d\n", (int)sizeof(struct page)); | 81 | pr_debug("aio_setup: sizeof(struct page) = %d\n", (int)sizeof(struct page)); |
@@ -509,7 +509,7 @@ static inline void really_put_req(struct kioctx *ctx, struct kiocb *req) | |||
509 | ctx->reqs_active--; | 509 | ctx->reqs_active--; |
510 | 510 | ||
511 | if (unlikely(!ctx->reqs_active && ctx->dead)) | 511 | if (unlikely(!ctx->reqs_active && ctx->dead)) |
512 | wake_up(&ctx->wait); | 512 | wake_up_all(&ctx->wait); |
513 | } | 513 | } |
514 | 514 | ||
515 | static void aio_fput_routine(struct work_struct *data) | 515 | static void aio_fput_routine(struct work_struct *data) |
@@ -566,7 +566,7 @@ static int __aio_put_req(struct kioctx *ctx, struct kiocb *req) | |||
566 | spin_lock(&fput_lock); | 566 | spin_lock(&fput_lock); |
567 | list_add(&req->ki_list, &fput_head); | 567 | list_add(&req->ki_list, &fput_head); |
568 | spin_unlock(&fput_lock); | 568 | spin_unlock(&fput_lock); |
569 | queue_work(aio_wq, &fput_work); | 569 | schedule_work(&fput_work); |
570 | } else { | 570 | } else { |
571 | req->ki_filp = NULL; | 571 | req->ki_filp = NULL; |
572 | really_put_req(ctx, req); | 572 | really_put_req(ctx, req); |
@@ -1218,7 +1218,7 @@ static void io_destroy(struct kioctx *ioctx) | |||
1218 | * by other CPUs at this point. Right now, we rely on the | 1218 | * by other CPUs at this point. Right now, we rely on the |
1219 | * locking done by the above calls to ensure this consistency. | 1219 | * locking done by the above calls to ensure this consistency. |
1220 | */ | 1220 | */ |
1221 | wake_up(&ioctx->wait); | 1221 | wake_up_all(&ioctx->wait); |
1222 | put_ioctx(ioctx); /* once for the lookup */ | 1222 | put_ioctx(ioctx); /* once for the lookup */ |
1223 | } | 1223 | } |
1224 | 1224 | ||