dm writecache: add cond_resched to loop in persistent_memory_claim()
authorMikulas Patocka <mpatocka@redhat.com>
Fri, 19 Jun 2020 15:51:34 +0000 (11:51 -0400)
committerMike Snitzer <snitzer@redhat.com>
Fri, 19 Jun 2020 16:32:24 +0000 (12:32 -0400)
commitd35bd764e6899a7bea71958f08d16cea5bfa1919
treedeffd0ce137febc8e079fca0efaea8660c108ac1
parentf2cd9a5e85dc25e10f6318bc6fbcb7dcff262561
dm writecache: add cond_resched to loop in persistent_memory_claim()

Add cond_resched() to a loop that fills in the mapper memory area
because the loop can be executed many times.

Fixes: 48debafe4f2fe ("dm: add writecache target")
Cc: stable@vger.kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-writecache.c