Commit b9d128f1088ea5245109dfc9bbceb128b6371a77
1 parent
a870a3a485
Exists in
master
and in
20 other branches
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>
Showing 3 changed files with 14 additions and 13 deletions Side-by-side Diff
fs/aio.c
include/linux/backing-dev.h
... | ... | @@ -331,5 +331,18 @@ |
331 | 331 | return 0; |
332 | 332 | } |
333 | 333 | |
334 | +static inline void blk_run_backing_dev(struct backing_dev_info *bdi, | |
335 | + struct page *page) | |
336 | +{ | |
337 | + if (bdi && bdi->unplug_io_fn) | |
338 | + bdi->unplug_io_fn(bdi, page); | |
339 | +} | |
340 | + | |
341 | +static inline void blk_run_address_space(struct address_space *mapping) | |
342 | +{ | |
343 | + if (mapping) | |
344 | + blk_run_backing_dev(mapping->backing_dev_info, NULL); | |
345 | +} | |
346 | + | |
334 | 347 | #endif /* _LINUX_BACKING_DEV_H */ |
include/linux/blkdev.h
... | ... | @@ -823,19 +823,6 @@ |
823 | 823 | return bdev->bd_disk->queue; |
824 | 824 | } |
825 | 825 | |
826 | -static inline void blk_run_backing_dev(struct backing_dev_info *bdi, | |
827 | - struct page *page) | |
828 | -{ | |
829 | - if (bdi && bdi->unplug_io_fn) | |
830 | - bdi->unplug_io_fn(bdi, page); | |
831 | -} | |
832 | - | |
833 | -static inline void blk_run_address_space(struct address_space *mapping) | |
834 | -{ | |
835 | - if (mapping) | |
836 | - blk_run_backing_dev(mapping->backing_dev_info, NULL); | |
837 | -} | |
838 | - | |
839 | 826 | /* |
840 | 827 | * blk_rq_pos() : the current sector |
841 | 828 | * blk_rq_bytes() : bytes left in the entire request |