fs: gate final fput task_work on PF_NO_TASKWORK
authorJens Axboe <axboe@kernel.dk>
Tue, 4 Jun 2024 16:51:32 +0000 (10:51 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 4 Jun 2024 17:11:23 +0000 (11:11 -0600)
commit8e2e7b4d1f57af86dd071f9e52446d407ac76164
tree6571c16f235fc3fde590beb575e6c688f70e1989
parent9415f3a311befc441b5eca3dd4afdeb042ef2049
fs: gate final fput task_work on PF_NO_TASKWORK

Rather than hardwire this to kernel threads, add a task flag that tells
us whether the task in question runs task_work or not. At fork time,
this flag is set for kernel threads. This is in preparation for allowing
kernel threads to signal that they will run deferred task_work.

No functional changes in this patch.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/file_table.c
include/linux/sched.h
kernel/fork.c