tomoyo: don't special case PF_IO_WORKER for PF_KTHREAD

Since commit 3bfe610669 ("io-wq: fork worker threads from original
task") stopped using PF_KTHREAD flag for the io_uring PF_IO_WORKER threads,
tomoyo_kernel_service() no longer needs to check PF_IO_WORKER flag.

(This is a 5.12+ patch. Please don't send to stable kernels.)

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
This commit is contained in:
Jens Axboe 2021-03-26 10:05:25 -06:00 committed by Tetsuo Handa
parent 0f4498cef9
commit 4e53d1701b
1 changed files with 1 additions and 1 deletions

View File

@ -613,7 +613,7 @@ static int tomoyo_check_unix_address(struct sockaddr *addr,
static bool tomoyo_kernel_service(void) static bool tomoyo_kernel_service(void)
{ {
/* Nothing to do if I am a kernel service. */ /* Nothing to do if I am a kernel service. */
return (current->flags & (PF_KTHREAD | PF_IO_WORKER)) == PF_KTHREAD; return current->flags & PF_KTHREAD;
} }
/** /**