aboutsummaryrefslogtreecommitdiffstats
path: root/module/os
diff options
context:
space:
mode:
authorRob Norris <[email protected]>2024-08-03 13:31:43 +1000
committerBrian Behlendorf <[email protected]>2024-09-18 11:23:49 -0700
commitd4bbe2ff38e8afdc43bc934a9a1fc0b0cb60a4eb (patch)
treee13b53b51d25cf23b88fdd26506ef23d2702414e /module/os
parent714d7666e55aba02c5e2f2ff032c655ae2c7e7a3 (diff)
config: remove HAVE_IO_SCHEDULE_TIMEOUT
Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Tino Reichardt <[email protected]> Signed-off-by: Rob Norris <[email protected]> Closes #16479
Diffstat (limited to 'module/os')
-rw-r--r--module/os/linux/spl/spl-condvar.c44
1 files changed, 1 insertions, 43 deletions
diff --git a/module/os/linux/spl/spl-condvar.c b/module/os/linux/spl/spl-condvar.c
index 5898789ad..c44cc018b 100644
--- a/module/os/linux/spl/spl-condvar.c
+++ b/module/os/linux/spl/spl-condvar.c
@@ -209,48 +209,6 @@ __cv_wait_idle(kcondvar_t *cvp, kmutex_t *mp)
}
EXPORT_SYMBOL(__cv_wait_idle);
-#if defined(HAVE_IO_SCHEDULE_TIMEOUT)
-#define spl_io_schedule_timeout(t) io_schedule_timeout(t)
-#else
-
-struct spl_task_timer {
- struct timer_list timer;
- struct task_struct *task;
-};
-
-static void
-__cv_wakeup(spl_timer_list_t t)
-{
- struct timer_list *tmr = (struct timer_list *)t;
- struct spl_task_timer *task_timer = from_timer(task_timer, tmr, timer);
-
- wake_up_process(task_timer->task);
-}
-
-static long
-spl_io_schedule_timeout(long time_left)
-{
- long expire_time = jiffies + time_left;
- struct spl_task_timer task_timer;
- struct timer_list *timer = &task_timer.timer;
-
- task_timer.task = current;
-
- timer_setup(timer, __cv_wakeup, 0);
-
- timer->expires = expire_time;
- add_timer(timer);
-
- io_schedule();
-
- del_timer_sync(timer);
-
- time_left = expire_time - jiffies;
-
- return (time_left < 0 ? 0 : time_left);
-}
-#endif
-
/*
* 'expire_time' argument is an absolute wall clock time in jiffies.
* Return value is time left (expire_time - now) or -1 if timeout occurred.
@@ -290,7 +248,7 @@ __cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp, clock_t expire_time,
*/
mutex_exit(mp);
if (io)
- time_left = spl_io_schedule_timeout(time_left);
+ time_left = io_schedule_timeout(time_left);
else
time_left = schedule_timeout(time_left);