From c19280c83c7dd040f00657cbf61e12ca3b936b91 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 10 Sep 2025 10:17:40 -0700 Subject: [PATCH] Add cond_resched to iput worker The iput worker can accumulate quite a bit of pending work to do. We've seen hung task warnings while it's doing its work (admitedly in debug kernels). There's no harm in throwing in a cond_resched so other tasks get a chance to do work. Signed-off-by: Zach Brown --- kmod/src/inode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kmod/src/inode.c b/kmod/src/inode.c index 61f06cd0..e1ac0e3e 100644 --- a/kmod/src/inode.c +++ b/kmod/src/inode.c @@ -1965,6 +1965,8 @@ static void iput_worker(struct work_struct *work) while (count-- > 0) iput(inode); + cond_resched(); + /* can't touch inode after final iput */ spin_lock(&inf->iput_lock);