diff options
Diffstat (limited to 'fs/afs')
-rw-r--r-- | fs/afs/callback.c | 4 | ||||
-rw-r--r-- | fs/afs/server.c | 10 | ||||
-rw-r--r-- | fs/afs/vlocation.c | 14 |
3 files changed, 6 insertions, 22 deletions
diff --git a/fs/afs/callback.c b/fs/afs/callback.c index 587ef5123cd8..7ef637d7f3a5 100644 --- a/fs/afs/callback.c +++ b/fs/afs/callback.c | |||
@@ -351,9 +351,7 @@ void afs_dispatch_give_up_callbacks(struct work_struct *work) | |||
351 | */ | 351 | */ |
352 | void afs_flush_callback_breaks(struct afs_server *server) | 352 | void afs_flush_callback_breaks(struct afs_server *server) |
353 | { | 353 | { |
354 | cancel_delayed_work(&server->cb_break_work); | 354 | mod_delayed_work(afs_callback_update_worker, &server->cb_break_work, 0); |
355 | queue_delayed_work(afs_callback_update_worker, | ||
356 | &server->cb_break_work, 0); | ||
357 | } | 355 | } |
358 | 356 | ||
359 | #if 0 | 357 | #if 0 |
diff --git a/fs/afs/server.c b/fs/afs/server.c index d59b7516e943..f342acf3547d 100644 --- a/fs/afs/server.c +++ b/fs/afs/server.c | |||
@@ -285,12 +285,7 @@ static void afs_reap_server(struct work_struct *work) | |||
285 | expiry = server->time_of_death + afs_server_timeout; | 285 | expiry = server->time_of_death + afs_server_timeout; |
286 | if (expiry > now) { | 286 | if (expiry > now) { |
287 | delay = (expiry - now) * HZ; | 287 | delay = (expiry - now) * HZ; |
288 | if (!queue_delayed_work(afs_wq, &afs_server_reaper, | 288 | mod_delayed_work(afs_wq, &afs_server_reaper, delay); |
289 | delay)) { | ||
290 | cancel_delayed_work(&afs_server_reaper); | ||
291 | queue_delayed_work(afs_wq, &afs_server_reaper, | ||
292 | delay); | ||
293 | } | ||
294 | break; | 289 | break; |
295 | } | 290 | } |
296 | 291 | ||
@@ -323,6 +318,5 @@ static void afs_reap_server(struct work_struct *work) | |||
323 | void __exit afs_purge_servers(void) | 318 | void __exit afs_purge_servers(void) |
324 | { | 319 | { |
325 | afs_server_timeout = 0; | 320 | afs_server_timeout = 0; |
326 | cancel_delayed_work(&afs_server_reaper); | 321 | mod_delayed_work(afs_wq, &afs_server_reaper, 0); |
327 | queue_delayed_work(afs_wq, &afs_server_reaper, 0); | ||
328 | } | 322 | } |
diff --git a/fs/afs/vlocation.c b/fs/afs/vlocation.c index 431984d2e372..57bcb1596530 100644 --- a/fs/afs/vlocation.c +++ b/fs/afs/vlocation.c | |||
@@ -561,12 +561,7 @@ 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 (!queue_delayed_work(afs_wq, &afs_vlocation_reap, | 564 | mod_delayed_work(afs_wq, &afs_vlocation_reap, delay); |
565 | delay)) { | ||
566 | cancel_delayed_work(&afs_vlocation_reap); | ||
567 | queue_delayed_work(afs_wq, &afs_vlocation_reap, | ||
568 | delay); | ||
569 | } | ||
570 | break; | 565 | break; |
571 | } | 566 | } |
572 | 567 | ||
@@ -614,13 +609,10 @@ void afs_vlocation_purge(void) | |||
614 | spin_lock(&afs_vlocation_updates_lock); | 609 | spin_lock(&afs_vlocation_updates_lock); |
615 | list_del_init(&afs_vlocation_updates); | 610 | list_del_init(&afs_vlocation_updates); |
616 | spin_unlock(&afs_vlocation_updates_lock); | 611 | spin_unlock(&afs_vlocation_updates_lock); |
617 | cancel_delayed_work(&afs_vlocation_update); | 612 | mod_delayed_work(afs_vlocation_update_worker, &afs_vlocation_update, 0); |
618 | queue_delayed_work(afs_vlocation_update_worker, | ||
619 | &afs_vlocation_update, 0); | ||
620 | destroy_workqueue(afs_vlocation_update_worker); | 613 | destroy_workqueue(afs_vlocation_update_worker); |
621 | 614 | ||
622 | cancel_delayed_work(&afs_vlocation_reap); | 615 | mod_delayed_work(afs_wq, &afs_vlocation_reap, 0); |
623 | queue_delayed_work(afs_wq, &afs_vlocation_reap, 0); | ||
624 | } | 616 | } |
625 | 617 | ||
626 | /* | 618 | /* |