]> git.baikalelectronics.ru Git - kernel.git/commit
kyber: avoid q->disk dereferences in trace points
authorChristoph Hellwig <hch@lst.de>
Tue, 12 Oct 2021 09:33:01 +0000 (11:33 +0200)
committerJens Axboe <axboe@kernel.dk>
Sat, 16 Oct 2021 03:02:57 +0000 (21:02 -0600)
commit3714a0e2ddfe1911eb786a38e59b34c073c5f570
treea6212c9aa366bbe05466a237f79e1f57f4b3346a
parentb73d8d272417a49751582cf1594aa4187cdee75c
kyber: avoid q->disk dereferences in trace points

q->disk becomes invalid after the gendisk is removed.  Work around this
by caching the dev_t for the tracepoints.  The real fix would be to
properly tear down the I/O schedulers with the gendisk, but that is
a much more invasive change.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20211012093301.GA27795@lst.de
Tested-by: Yi Zhang <yi.zhang@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/kyber-iosched.c
include/trace/events/kyber.h