You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
workqueue: use mod_delayed_work() instead of __cancel + queue
Now that mod_delayed_work() is safe to call from IRQ handlers, __cancel_delayed_work() followed by queue_delayed_work() can be replaced with mod_delayed_work(). Most conversions are straight-forward except for the following. * net/core/link_watch.c: linkwatch_schedule_work() was doing a quite elaborate dancing around its delayed_work. Collapse it such that linkwatch_work is queued for immediate execution if LW_URGENT and existing timer is kept otherwise. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:
@@ -672,7 +672,6 @@ static void __reschedule_timeout(int drive, const char *message)
|
||||
|
||||
if (drive == current_reqD)
|
||||
drive = current_drive;
|
||||
__cancel_delayed_work(&fd_timeout);
|
||||
|
||||
if (drive < 0 || drive >= N_DRIVE) {
|
||||
delay = 20UL * HZ;
|
||||
@@ -680,7 +679,7 @@ static void __reschedule_timeout(int drive, const char *message)
|
||||
} else
|
||||
delay = UDP->timeout;
|
||||
|
||||
queue_delayed_work(floppy_wq, &fd_timeout, delay);
|
||||
mod_delayed_work(floppy_wq, &fd_timeout, delay);
|
||||
if (UDP->flags & FD_DEBUG)
|
||||
DPRINT("reschedule timeout %s\n", message);
|
||||
timeout_message = message;
|
||||
|
||||
Reference in New Issue
Block a user