summaryrefslogtreecommitdiff
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-05-28 16:41:23 +0300
committerJens Axboe <axboe@kernel.dk>2020-05-28 17:47:13 +0300
commitdc35ada4251f183137ee3a524543c9329d7a4fa2 (patch)
tree4a62c8601ade41178670dac63074757199dc40ce /include/linux/blkdev.h
parente7ecc142e9f33f5a8808b13fb0afa14f36aeeca3 (diff)
downloadlinux-dc35ada4251f183137ee3a524543c9329d7a4fa2.tar.xz
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: 956d510ee78 ("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>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 6f7ff0fa8fcf..8fd900998b4e 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1892,12 +1892,12 @@ static inline void blk_wake_io_task(struct task_struct *waiter)
wake_up_process(waiter);
}
+#ifdef CONFIG_BLOCK
unsigned long disk_start_io_acct(struct gendisk *disk, unsigned int sectors,
unsigned int op);
void disk_end_io_acct(struct gendisk *disk, unsigned int op,
unsigned long start_time);
-#ifdef CONFIG_BLOCK
/**
* bio_start_io_acct - start I/O accounting for bio based drivers
* @bio: bio to start account for