]> git.proxmox.com Git - mirror_zfs.git/commit
Replace usage of schedule_timeout with schedule_timeout_interruptible (#16150)
authorDaniel Perry <dtperry@amazon.com>
Thu, 9 May 2024 14:30:28 +0000 (10:30 -0400)
committerGitHub <noreply@github.com>
Thu, 9 May 2024 14:30:28 +0000 (07:30 -0700)
commit2dff7527d4a40310f589045f5ab3a07b02963516
tree84199de508e0870450830169e7a3e62a4de57d6d
parent04bae5ec95f7273105237159a882d5b72ec2b998
Replace usage of schedule_timeout with schedule_timeout_interruptible (#16150)

This commit replaces current usages of schedule_timeout() with
schedule_timeout_interruptible() in code paths that expect the running
task to sleep for a short period of time. When schedule_timeout() is
called without previously calling set_current_state(), the running
task never sleeps because the task state remains in TASK_RUNNING.

By calling schedule_timeout_interruptible() to set the task state to
TASK_INTERRUPTIBLE before calling schedule_timeout() we achieve the
intended/desired behavior of putting the task to sleep for the
specified timeout.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Daniel Perry <dtperry@amazon.com>
Closes #16150
module/os/linux/spl/spl-taskq.c
module/os/linux/zfs/vdev_disk.c
module/os/linux/zfs/zvol_os.c