Commit f5ff8422 authored by Jens Axboe's avatar Jens Axboe Committed by Jens Axboe

Fix warnings with !CONFIG_BLOCK

Hide everything in blkdev.h with CONFIG_BLOCK isn't set, and fixup
the (few) files that fail to build because they were relying on blkdev.h
pulling in extra includes for them.
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent 3317fedb
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/fs.h> #include <linux/fs.h>
......
#ifndef _LINUX_BLKDEV_H #ifndef _LINUX_BLKDEV_H
#define _LINUX_BLKDEV_H #define _LINUX_BLKDEV_H
#ifdef CONFIG_BLOCK
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/major.h> #include <linux/major.h>
#include <linux/genhd.h> #include <linux/genhd.h>
...@@ -32,8 +34,6 @@ ...@@ -32,8 +34,6 @@
) )
#endif #endif
#ifdef CONFIG_BLOCK
struct scsi_ioctl_command; struct scsi_ioctl_command;
struct request_queue; struct request_queue;
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#define WRITEBACK_H #define WRITEBACK_H
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/fs.h>
struct backing_dev_info; struct backing_dev_info;
......
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
#include <linux/delayacct.h> #include <linux/delayacct.h>
#include <linux/reciprocal_div.h> #include <linux/reciprocal_div.h>
#include <linux/unistd.h> #include <linux/unistd.h>
#include <linux/pagemap.h>
#include <asm/tlb.h> #include <asm/tlb.h>
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <linux/backing-dev.h> #include <linux/backing-dev.h>
#include <linux/task_io_accounting_ops.h> #include <linux/task_io_accounting_ops.h>
#include <linux/pagevec.h> #include <linux/pagevec.h>
#include <linux/pagemap.h>
void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page) void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment