Commit f77692d6 authored by Mike Snitzer's avatar Mike Snitzer
Browse files

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: 8b211aac ("dm: add two stage requeue mechanism")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarMike Snitzer <snitzer@kernel.org>
parent 0ca44fce
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1009,6 +1009,7 @@ static void dm_wq_requeue_work(struct work_struct *work)
		io->next = NULL;
		__dm_io_complete(io, false);
		io = next;
		cond_resched();
	}
}