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:33:50 +0000 (08:33 +0200)
commitf00597350210ac9458e7865b176b982dfb33d8c0
tree30f2767466d0d3255100c2b62b55c8f81fd7faba
parent65e6282f0d752fb025ef4cc62a51b54ecce16b09
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