diff options
| author | Frederic Weisbecker <frederic@kernel.org> | 2024-06-21 11:15:59 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-08-03 08:54:16 +0200 |
| commit | d3ea49fb4a661f385fb54d9463cf447543c10e86 (patch) | |
| tree | 6a5b11a78bed6ae6f084c13e016c793cf9a5faf3 /include | |
| parent | 0475bba01abcf6cc193906c91443ceb569da371a (diff) | |
| download | linux-d3ea49fb4a661f385fb54d9463cf447543c10e86.tar.gz linux-d3ea49fb4a661f385fb54d9463cf447543c10e86.tar.bz2 linux-d3ea49fb4a661f385fb54d9463cf447543c10e86.zip | |
task_work: Introduce task_work_cancel() again
commit f409530e4db9dd11b88cb7703c97c8f326ff6566 upstream.
Re-introduce task_work_cancel(), this time to cancel an actual callback
and not *any* callback pointing to a given function. This is going to be
needed for perf events event freeing.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240621091601.18227-3-frederic@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/task_work.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/task_work.h b/include/linux/task_work.h index 23ab01ae185e..26b8a47f41fc 100644 --- a/include/linux/task_work.h +++ b/include/linux/task_work.h @@ -31,6 +31,7 @@ int task_work_add(struct task_struct *task, struct callback_head *twork, struct callback_head *task_work_cancel_match(struct task_struct *task, bool (*match)(struct callback_head *, void *data), void *data); struct callback_head *task_work_cancel_func(struct task_struct *, task_work_func_t); +bool task_work_cancel(struct task_struct *task, struct callback_head *cb); void task_work_run(void); static inline void exit_task_work(struct task_struct *task) |
