dm writecache: add cond_resched to loop in persistent_memory_claim()
commitedb930b4eaa735d31d8b7b7d2497b9c51e451d5f
authorMikulas Patocka <mpatocka@redhat.com>
Fri, 19 Jun 2020 15:51:34 +0000 (19 11:51 -0400)
committerSasha Levin <sashal@kernel.org>
Tue, 30 Jun 2020 19:36:31 +0000 (30 15:36 -0400)
treeb1703415c7bc7967771e8c45b33128cc18123e47
parent22551da148c98636fe91b66b8dba3a1d1e1e46cc
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