kthread: add kthread_stop_put
authorAndreas Gruenbacher <agruenba@redhat.com>
Thu, 7 Sep 2023 23:40:48 +0000 (01:40 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 4 Oct 2023 17:41:57 +0000 (10:41 -0700)
commit6309727ef27162deabd5c095c11af24970fba5a2
tree84e15c2ddc239bd049b2de325d63067badb85a1d
parented5378a387fd7c382497f2abcf4605e030b64044
kthread: add kthread_stop_put

Add a kthread_stop_put() helper that stops a thread and puts its task
struct.  Use it to replace the various instances of kthread_stop()
followed by put_task_struct().

Remove the kthread_stop_put() macro in usbip that is similar but doesn't
return the result of kthread_stop().

[agruenba@redhat.com: fix kerneldoc comment]
Link: https://lkml.kernel.org/r/20230911111730.2565537-1-agruenba@redhat.com
[akpm@linux-foundation.org: document kthread_stop_put()'s argument]
Link: https://lkml.kernel.org/r/20230907234048.2499820-1-agruenba@redhat.com
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 files changed:
drivers/accel/ivpu/ivpu_job.c
drivers/dma-buf/st-dma-fence-chain.c
drivers/dma-buf/st-dma-fence.c
drivers/gpu/drm/i915/gt/selftest_migrate.c
drivers/net/xen-netback/interface.c
drivers/usb/usbip/usbip_common.h
fs/gfs2/ops_fstype.c
include/linux/kthread.h
kernel/irq/manage.c
kernel/kthread.c
kernel/smpboot.c
mm/damon/core.c
net/core/pktgen.c