提交 a9df62c7 编写于 作者: A Andrew Morton 提交者: Linus Torvalds

aio: use flush_work()

Migrate AIO over to use flush_work().

Cc: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Zach Brown <zach.brown@oracle.com>
Cc: Benjamin LaHaise <bcrl@kvack.org>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 83c22520
......@@ -346,10 +346,9 @@ void fastcall exit_aio(struct mm_struct *mm)
wait_for_all_aios(ctx);
/*
* this is an overkill, but ensures we don't leave
* the ctx on the aio_wq
* Ensure we don't leave the ctx on the aio_wq
*/
flush_workqueue(aio_wq);
flush_work(aio_wq, &ctx->wq.work);
if (1 != atomic_read(&ctx->users))
printk(KERN_DEBUG
......@@ -372,7 +371,7 @@ void fastcall __put_ioctx(struct kioctx *ctx)
BUG_ON(ctx->reqs_active);
cancel_delayed_work(&ctx->wq);
flush_workqueue(aio_wq);
flush_work(aio_wq, &ctx->wq.work);
aio_free_ring(ctx);
mmdrop(ctx->mm);
ctx->mm = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册