]> git.baikalelectronics.ru Git - kernel.git/commit
block: fix leak of q->rq_wb
authorOmar Sandoval <osandov@fb.com>
Tue, 28 Mar 2017 23:12:17 +0000 (16:12 -0700)
committerJens Axboe <axboe@fb.com>
Wed, 29 Mar 2017 14:09:08 +0000 (08:09 -0600)
commitd0042394a4999d61ff6f5db8a62b0f394d0cc842
tree772bf87a8074d74b8748e878249568627a2cce0b
parentddf4c99ab9d053dfc7dbc69a389a3da541f76b4a
block: fix leak of q->rq_wb

CONFIG_DEBUG_TEST_DRIVER_REMOVE found a possible leak of q->rq_wb when a
request queue is reregistered. This has been a problem since wbt was
introduced, but the WARN_ON(!list_empty(&stats->callbacks)) in the
blk-stat rework exposed it. Fix it by cleaning up wbt when we unregister
the queue.

Fixes: da138941a1ef ("block: hook up writeback throttling")
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-sysfs.c