diff options
author | Tejun Heo <tj@kernel.org> | 2011-01-14 10:56:37 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-14 12:25:11 -0500 |
commit | 0ad53eeefcbb2620b6a71ffdaad4add20b450b8b (patch) | |
tree | 6f24c2d7b0a7554842544e51bd8e52159086669e /fs/afs/vlocation.c | |
parent | e1fcc7e2a719d139322fab3f47cfbd4340cf3d82 (diff) |
afs: add afs_wq and use it instead of the system workqueue
flush_scheduled_work() is going away. afs needs to make sure all the
works it has queued have finished before being unloaded and there can
be arbitrary number of pending works. Add afs_wq and use it as the
flush domain instead of the system workqueue.
Also, convert cancel_delayed_work() + flush_scheduled_work() to
cancel_delayed_work_sync() in afs_mntpt_kill_timer().
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: linux-afs@lists.infradead.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/afs/vlocation.c')
-rw-r--r-- | fs/afs/vlocation.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/afs/vlocation.c b/fs/afs/vlocation.c index 9ac260d1361d..431984d2e372 100644 --- a/fs/afs/vlocation.c +++ b/fs/afs/vlocation.c | |||
@@ -507,8 +507,8 @@ void afs_put_vlocation(struct afs_vlocation *vl) | |||
507 | _debug("buried"); | 507 | _debug("buried"); |
508 | list_move_tail(&vl->grave, &afs_vlocation_graveyard); | 508 | list_move_tail(&vl->grave, &afs_vlocation_graveyard); |
509 | vl->time_of_death = get_seconds(); | 509 | vl->time_of_death = get_seconds(); |
510 | schedule_delayed_work(&afs_vlocation_reap, | 510 | queue_delayed_work(afs_wq, &afs_vlocation_reap, |
511 | afs_vlocation_timeout * HZ); | 511 | afs_vlocation_timeout * HZ); |
512 | 512 | ||
513 | /* suspend updates on this record */ | 513 | /* suspend updates on this record */ |
514 | if (!list_empty(&vl->update)) { | 514 | if (!list_empty(&vl->update)) { |
@@ -561,11 +561,11 @@ static void afs_vlocation_reaper(struct work_struct *work) | |||
561 | if (expiry > now) { | 561 | if (expiry > now) { |
562 | delay = (expiry - now) * HZ; | 562 | delay = (expiry - now) * HZ; |
563 | _debug("delay %lu", delay); | 563 | _debug("delay %lu", delay); |
564 | if (!schedule_delayed_work(&afs_vlocation_reap, | 564 | if (!queue_delayed_work(afs_wq, &afs_vlocation_reap, |
565 | delay)) { | 565 | delay)) { |
566 | cancel_delayed_work(&afs_vlocation_reap); | 566 | cancel_delayed_work(&afs_vlocation_reap); |
567 | schedule_delayed_work(&afs_vlocation_reap, | 567 | queue_delayed_work(afs_wq, &afs_vlocation_reap, |
568 | delay); | 568 | delay); |
569 | } | 569 | } |
570 | break; | 570 | break; |
571 | } | 571 | } |
@@ -620,7 +620,7 @@ void afs_vlocation_purge(void) | |||
620 | destroy_workqueue(afs_vlocation_update_worker); | 620 | destroy_workqueue(afs_vlocation_update_worker); |
621 | 621 | ||
622 | cancel_delayed_work(&afs_vlocation_reap); | 622 | cancel_delayed_work(&afs_vlocation_reap); |
623 | schedule_delayed_work(&afs_vlocation_reap, 0); | 623 | queue_delayed_work(afs_wq, &afs_vlocation_reap, 0); |
624 | } | 624 | } |
625 | 625 | ||
626 | /* | 626 | /* |