diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-10-29 08:59:26 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-10-29 08:59:26 -0400 |
commit | b9d128f1088ea5245109dfc9bbceb128b6371a77 (patch) | |
tree | 63e85f281dd372e77af4022e2235a4e5a46287de /include/linux/backing-dev.h | |
parent | a870a3a485ddf7c0dec549269ed71d169556d61c (diff) |
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>
Diffstat (limited to 'include/linux/backing-dev.h')
-rw-r--r-- | include/linux/backing-dev.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index b449e738533a..fcbc26af00e4 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) | |||
331 | return 0; | 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 | #endif /* _LINUX_BACKING_DEV_H */ | 347 | #endif /* _LINUX_BACKING_DEV_H */ |