/*
* Ensure we don't leave the ctx on the aio_wq
*/
- flush_work(aio_wq, &ctx->wq.work);
+ cancel_work_sync(&ctx->wq.work);
if (1 != atomic_read(&ctx->users))
printk(KERN_DEBUG
BUG_ON(ctx->reqs_active);
cancel_delayed_work(&ctx->wq);
- flush_work(aio_wq, &ctx->wq.work);
+ cancel_work_sync(&ctx->wq.work);
aio_free_ring(ctx);
mmdrop(ctx->mm);
ctx->mm = NULL;