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)
committerSasha Levin <sashal@kernel.org>
Tue, 30 Jun 2020 19:37:12 +0000 (15:37 -0400)
commitcc66553004f4589f76804fb56c19331a1c00a043
tree4889b86c41676c57fac2d9b6ae4e588dabb871b2
parenta51e71cbf6e64b170ef01a78f94df01cb46acb9b
dm writecache: add cond_resched to loop in persistent_memory_claim()

commit d35bd764e6899a7bea71958f08d16cea5bfa1919 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-writecache.c