diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c index 9076f3324cb1..e9a07ac7bb26 100644 --- a/fs/erofs/zdata.c +++ b/fs/erofs/zdata.c @@ -1280,7 +1280,7 @@ static void z_erofs_decompress_kickoff(struct z_erofs_decompressqueue *io, if (atomic_add_return(bios, &io->pending_bios)) return; /* Use (kthread_)work and sync decompression for atomic contexts only */ - if (in_atomic() || irqs_disabled()) { + if (!in_task() || irqs_disabled() || rcu_read_lock_any_held()) { #ifdef CONFIG_EROFS_FS_PCPU_KTHREAD struct kthread_worker *worker;