Skip to content

Commit f77692d

Browse files
author
Mike Snitzer
committed
dm: add cond_resched() to dm_wq_requeue_work()
Otherwise the while() loop in dm_wq_requeue_work() can result in a "dead loop" on systems that have preemption disabled. This is particularly problematic on single cpu systems. Fixes: 8b211aa ("dm: add two stage requeue mechanism") Cc: [email protected] Signed-off-by: Mike Snitzer <[email protected]>
1 parent 0ca44fc commit f77692d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/md/dm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,6 +1009,7 @@ static void dm_wq_requeue_work(struct work_struct *work)
10091009
io->next = NULL;
10101010
__dm_io_complete(io, false);
10111011
io = next;
1012+
cond_resched();
10121013
}
10131014
}
10141015

0 commit comments

Comments
 (0)