]> git.baikalelectronics.ru Git - kernel.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 08:50:17 +0000 (10:50 +0200)
commit0fbe99b0e33030ecb97c128e50908628ae342709
tree795b352e06b1b110aa1826935e56f686d520ae10
parente61b59761f6963319e729e97769ebd6d9e3196c8
dm writecache: add cond_resched to avoid CPU hangs

commit ecf3e18b40cd7444564287f8ec8b5a5dc4fb7783 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