diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2022-11-23 23:18:37 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2022-11-24 17:09:10 +0300 |
commit | 9a5a305686971f4be10c6d7251c8348d74b3e014 (patch) | |
tree | 92f42887a399d5728b85adf2505c54f0762e7ec1 /drivers/char/tpm/tpm-dev-common.c | |
parent | 6e1fc2591f116dfb20b65cf27356475461d61bd8 (diff) | |
download | linux-9a5a305686971f4be10c6d7251c8348d74b3e014.tar.xz |
timers: Get rid of del_singleshot_timer_sync()
del_singleshot_timer_sync() used to be an optimization for deleting timers
which are not rearmed from the timer callback function.
This optimization turned out to be broken and got mapped to
del_timer_sync() about 17 years ago.
Get rid of the undocumented indirection and use del_timer_sync() directly.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Link: https://lore.kernel.org/r/20221123201624.706987932@linutronix.de
Diffstat (limited to 'drivers/char/tpm/tpm-dev-common.c')
-rw-r--r-- | drivers/char/tpm/tpm-dev-common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/tpm/tpm-dev-common.c b/drivers/char/tpm/tpm-dev-common.c index dc4c0a0a5129..30b4c288c1bb 100644 --- a/drivers/char/tpm/tpm-dev-common.c +++ b/drivers/char/tpm/tpm-dev-common.c @@ -155,7 +155,7 @@ ssize_t tpm_common_read(struct file *file, char __user *buf, out: if (!priv->response_length) { *off = 0; - del_singleshot_timer_sync(&priv->user_read_timer); + del_timer_sync(&priv->user_read_timer); flush_work(&priv->timeout_work); } mutex_unlock(&priv->buffer_mutex); @@ -262,7 +262,7 @@ __poll_t tpm_common_poll(struct file *file, poll_table *wait) void tpm_common_release(struct file *file, struct file_priv *priv) { flush_work(&priv->async_work); - del_singleshot_timer_sync(&priv->user_read_timer); + del_timer_sync(&priv->user_read_timer); flush_work(&priv->timeout_work); file->private_data = NULL; priv->response_length = 0; |