dm stats: add cond_resched when looping over entries
authorMikulas Patocka <mpatocka@redhat.com>
Sun, 24 Apr 2022 20:43:00 +0000 (16:43 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Jun 2022 06:20:57 +0000 (08:20 +0200)
commit1dbcb821c63d09dc4a641bf99bb05f238610717f
tree18859412e965a50b5a807dd2ec60f90a78936ae7
parent4cd9c5f4235d0132e89bcc4cf03843494531e99b
dm stats: add cond_resched when looping over entries

commit bfe2b0146c4d0230b68f5c71a64380ff8d361f8b upstream.

dm-stats can be used with a very large number of entries (it is only
limited by 1/4 of total system memory), so add rescheduling points to
the loops that iterate over the entries.

Cc: stable@vger.kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-stats.c