blk-stat: make q->stats->lock irqsafe
authorTejun Heo <tj@kernel.org>
Tue, 1 Sep 2020 18:52:32 +0000 (14:52 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Sep 2020 17:14:30 +0000 (19:14 +0200)
commit3c761332597d1dc3bc527ba5924f300dc43ae9a2
treec311ddf543bf0482758dfde8583fea7bf8bac9ea
parent70d22582c3eb6d50c30574019777d546fbd5cc81
blk-stat: make q->stats->lock irqsafe

commit e11d80a849e010f78243bb6f6af7dccef3a71a90 upstream.

blk-iocost calls blk_stat_enable_accounting() while holding an irqsafe lock
which triggers a lockdep splat because q->stats->lock isn't irqsafe. Let's
make it irqsafe.

Signed-off-by: Tejun Heo <tj@kernel.org>
Fixes: cd006509b0a9 ("blk-iocost: account for IO size when testing latencies")
Cc: stable@vger.kernel.org # v5.8+
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
block/blk-stat.c