]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dm writecache: add cond_resched to avoid CPU hangs
authorMikulas Patocka <mpatocka@redhat.com>
Fri, 27 Mar 2020 11:22:36 +0000 (07:22 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Apr 2020 14:12:10 +0000 (16:12 +0200)
commit8b7ab21aa980aed6b820bde4962c42781b547ce7
treefc358562126ca6f6f0f19c95b9349fe1dd871a80
parent0ff723cb7899acc6bd79814127a1db9e80792b1b
dm writecache: add cond_resched to avoid CPU hangs

commit 1edaa447d958bec24c6a79685a5790d98976fd16 upstream.

Initializing a dm-writecache device can take a long time when the
persistent memory device is large.  Add cond_resched() to a few loops
to avoid warnings that the CPU is stuck.

Cc: stable@vger.kernel.org # v4.18+
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