From: Andrew Morton Date: Wed, 9 May 2007 09:33:54 +0000 (-0700) Subject: aio: use flush_work() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a9df62c7585e6caa1e7d2425b2b14460ec3afc20;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git aio: use flush_work() Migrate AIO over to use flush_work(). Cc: "Maciej W. Rozycki" Cc: David Howells Cc: Zach Brown Cc: Benjamin LaHaise Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/aio.c b/fs/aio.c index b97ab8028b6..d18690bb03e 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -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;