diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2007-05-09 05:34:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-09 15:30:53 -0400 |
commit | 28e53bddf814485699a4142bc056fd37d4e11dd4 (patch) | |
tree | 5182090c4cc2186eedbda3cb90ed82a2836f6ff6 /fs | |
parent | 5830c5902138f80b0a097b797200c739466beedd (diff) |
unify flush_work/flush_work_keventd and rename it to cancel_work_sync
flush_work(wq, work) doesn't need the first parameter, we can use cwq->wq
(this was possible from the very beginnig, I missed this). So we can unify
flush_work_keventd and flush_work.
Also, rename flush_work() to cancel_work_sync() and fix all callers.
Perhaps this is not the best name, but "flush_work" is really bad.
(akpm: this is why the earlier patches bypassed maintainers)
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Tejun Heo <htejun@gmail.com>
Cc: Auke Kok <auke-jan.h.kok@intel.com>,
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/aio.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -348,7 +348,7 @@ void fastcall exit_aio(struct mm_struct *mm) | |||
348 | /* | 348 | /* |
349 | * Ensure we don't leave the ctx on the aio_wq | 349 | * Ensure we don't leave the ctx on the aio_wq |
350 | */ | 350 | */ |
351 | flush_work(aio_wq, &ctx->wq.work); | 351 | cancel_work_sync(&ctx->wq.work); |
352 | 352 | ||
353 | if (1 != atomic_read(&ctx->users)) | 353 | if (1 != atomic_read(&ctx->users)) |
354 | printk(KERN_DEBUG | 354 | printk(KERN_DEBUG |
@@ -371,7 +371,7 @@ void fastcall __put_ioctx(struct kioctx *ctx) | |||
371 | BUG_ON(ctx->reqs_active); | 371 | BUG_ON(ctx->reqs_active); |
372 | 372 | ||
373 | cancel_delayed_work(&ctx->wq); | 373 | cancel_delayed_work(&ctx->wq); |
374 | flush_work(aio_wq, &ctx->wq.work); | 374 | cancel_work_sync(&ctx->wq.work); |
375 | aio_free_ring(ctx); | 375 | aio_free_ring(ctx); |
376 | mmdrop(ctx->mm); | 376 | mmdrop(ctx->mm); |
377 | ctx->mm = NULL; | 377 | ctx->mm = NULL; |