summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-10-29 13:59:26 +0100
committerJens Axboe <jens.axboe@oracle.com>2009-10-29 13:59:26 +0100
commitb9d128f1088ea5245109dfc9bbceb128b6371a77 (patch)
tree63e85f281dd372e77af4022e2235a4e5a46287de
parenta870a3a485ddf7c0dec549269ed71d169556d61c (diff)
downloadop-kernel-dev-b9d128f1088ea5245109dfc9bbceb128b6371a77.zip
op-kernel-dev-b9d128f1088ea5245109dfc9bbceb128b6371a77.tar.gz
block: move bdi/address_space unplug functions to backing-dev.h
There's nothing block related about them, the backing device is used by things like NFS etc as well. This gets rid of the need to protect such calls by CONFIG_BLOCK. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-rw-r--r--fs/aio.c1
-rw-r--r--include/linux/backing-dev.h13
-rw-r--r--include/linux/blkdev.h13
3 files changed, 14 insertions, 13 deletions
diff --git a/fs/aio.c b/fs/aio.c
index cf0bef4..c30dfc0 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -15,6 +15,7 @@
#include <linux/aio_abi.h>
#include <linux/module.h>
#include <linux/syscalls.h>
+#include <linux/backing-dev.h>
#include <linux/uio.h>
#define DEBUG 0
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h
index b449e73..fcbc26a 100644
--- a/include/linux/backing-dev.h
+++ b/include/linux/backing-dev.h
@@ -331,4 +331,17 @@ static inline int bdi_sched_wait(void *word)
return 0;
}
+static inline void blk_run_backing_dev(struct backing_dev_info *bdi,
+ struct page *page)
+{
+ if (bdi && bdi->unplug_io_fn)
+ bdi->unplug_io_fn(bdi, page);
+}
+
+static inline void blk_run_address_space(struct address_space *mapping)
+{
+ if (mapping)
+ blk_run_backing_dev(mapping->backing_dev_info, NULL);
+}
+
#endif /* _LINUX_BACKING_DEV_H */
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 221cecd..39c601f 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -823,19 +823,6 @@ static inline struct request_queue *bdev_get_queue(struct block_device *bdev)
return bdev->bd_disk->queue;
}
-static inline void blk_run_backing_dev(struct backing_dev_info *bdi,
- struct page *page)
-{
- if (bdi && bdi->unplug_io_fn)
- bdi->unplug_io_fn(bdi, page);
-}
-
-static inline void blk_run_address_space(struct address_space *mapping)
-{
- if (mapping)
- blk_run_backing_dev(mapping->backing_dev_info, NULL);
-}
-
/*
* blk_rq_pos() : the current sector
* blk_rq_bytes() : bytes left in the entire request
OpenPOWER on IntegriCloud