diff options
author | Andrew Morton <akpm@osdl.org> | 2007-05-09 05:33:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-09 15:30:51 -0400 |
commit | a9df62c7585e6caa1e7d2425b2b14460ec3afc20 (patch) | |
tree | f3d291e208ca09cb0c185ed96242bb977e4e60e3 /fs/aio.c | |
parent | 83c22520c51bf67529367e8237f95c03fe44e2da (diff) |
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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/aio.c')
-rw-r--r-- | fs/aio.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -346,10 +346,9 @@ void fastcall exit_aio(struct mm_struct *mm) | |||
346 | 346 | ||
347 | wait_for_all_aios(ctx); | 347 | wait_for_all_aios(ctx); |
348 | /* | 348 | /* |
349 | * this is an overkill, but ensures we don't leave | 349 | * Ensure we don't leave the ctx on the aio_wq |
350 | * the ctx on the aio_wq | ||
351 | */ | 350 | */ |
352 | flush_workqueue(aio_wq); | 351 | flush_work(aio_wq, &ctx->wq.work); |
353 | 352 | ||
354 | if (1 != atomic_read(&ctx->users)) | 353 | if (1 != atomic_read(&ctx->users)) |
355 | printk(KERN_DEBUG | 354 | printk(KERN_DEBUG |
@@ -372,7 +371,7 @@ void fastcall __put_ioctx(struct kioctx *ctx) | |||
372 | BUG_ON(ctx->reqs_active); | 371 | BUG_ON(ctx->reqs_active); |
373 | 372 | ||
374 | cancel_delayed_work(&ctx->wq); | 373 | cancel_delayed_work(&ctx->wq); |
375 | flush_workqueue(aio_wq); | 374 | flush_work(aio_wq, &ctx->wq.work); |
376 | aio_free_ring(ctx); | 375 | aio_free_ring(ctx); |
377 | mmdrop(ctx->mm); | 376 | mmdrop(ctx->mm); |
378 | ctx->mm = NULL; | 377 | ctx->mm = NULL; |