]> git.baikalelectronics.ru Git - kernel.git/commit
block: fix a warning when blkdev.h is included for !CONFIG_BLOCK builds
authorChristoph Hellwig <hch@lst.de>
Thu, 28 May 2020 13:41:23 +0000 (15:41 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 28 May 2020 14:47:13 +0000 (08:47 -0600)
commit87ee14f335020726277df736b8b206915bf8853a
tree4a62c8601ade41178670dac63074757199dc40ce
parent8ebcb81c9b623960f371223fbfd96d2525625955
block: fix a warning when blkdev.h is included for !CONFIG_BLOCK builds

disk_start_io_acct and disk_end_io_acct need at least a struct gendisk
forward declaration, but for weird historic reasons much of blkdev.h
is stubbed out for CONFIG_BLOCK=n.  Fix this by stubbing more out for
now, but eventually this header will need a massive cleanup.

Fixes: 5cebec8de4d ("block: add disk/bio-based accounting helpers")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/blkdev.h