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:49:34 +0200 |
| commit | 8c95f5bde8e38c6e81bc9309a51ca35097217711 (patch) | |
| tree | 43c9e8efeed4ad8d4b161c7e00874dec392c27bd /include/linux | |
| parent | a5a1788a4961bbfd362698bf8e29b72aa446c2f3 (diff) | |
| download | linux-8c95f5bde8e38c6e81bc9309a51ca35097217711.tar.gz linux-8c95f5bde8e38c6e81bc9309a51ca35097217711.tar.bz2 linux-8c95f5bde8e38c6e81bc9309a51ca35097217711.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/linux')
| -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) |
