mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 07:04:24 +00:00
dm: add cond_resched() to dm_wq_work()
Otherwise the while() loop in dm_wq_work() can result in a "dead loop" on systems that have preemption disabled. This is particularly problematic on single cpu systems. Cc: stable@vger.kernel.org Signed-off-by: Pingfan Liu <piliu@redhat.com> Acked-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
This commit is contained in:
parent
b0bbd86a28
commit
0ca44fcef2
1 changed files with 1 additions and 0 deletions
|
@ -2570,6 +2570,7 @@ static void dm_wq_work(struct work_struct *work)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
submit_bio_noacct(bio);
|
submit_bio_noacct(bio);
|
||||||
|
cond_resched();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue