mirror of
https://github.com/versity/scoutfs.git
synced 2026-01-06 12:06:26 +00:00
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 <zab@versity.com>
This commit is contained in:
@@ -1965,6 +1965,8 @@ static void iput_worker(struct work_struct *work)
|
|||||||
while (count-- > 0)
|
while (count-- > 0)
|
||||||
iput(inode);
|
iput(inode);
|
||||||
|
|
||||||
|
cond_resched();
|
||||||
|
|
||||||
/* can't touch inode after final iput */
|
/* can't touch inode after final iput */
|
||||||
|
|
||||||
spin_lock(&inf->iput_lock);
|
spin_lock(&inf->iput_lock);
|
||||||
|
|||||||
Reference in New Issue
Block a user