Re: [PATCH] kthread: add kthread_mod_pending_delayed_work api

From: Christoph Hellwig
Date: Tue Feb 16 2021 - 04:15:41 EST


On Sun, Feb 14, 2021 at 12:06:11AM +0000, Yiwei Zhang wrote:
> The existing kthread_mod_delayed_work api will queue a new work if
> failing to cancel the current work due to no longer being pending.
> However, there's a case that the same work can be enqueued from both
> an async request and a delayed work, and a racing could happen if the
> async request comes right after the timeout delayed work gets scheduled,
> because the clean up work may not be safe to run twice.

Who is going to use this? Please submit it together with the actual
user.