X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=block%2Fblk-core.c;h=718897e6d37f2293615a858ea880b8e245ad7050;hb=1fa8f6d68b5c8ca0a608fd8d296c5f07ac788cd6;hp=71da5111120c09a6b52c26bf509cb4c14269aab2;hpb=2058297d2d045cb57138c33b87cfabcc80e65186;p=mirror_ubuntu-zesty-kernel.git diff --git a/block/blk-core.c b/block/blk-core.c index 71da5111120c..718897e6d37f 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -2358,6 +2358,25 @@ void blk_rq_bio_prep(struct request_queue *q, struct request *rq, rq->rq_disk = bio->bi_bdev->bd_disk; } +#if ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE +/** + * rq_flush_dcache_pages - Helper function to flush all pages in a request + * @rq: the request to be flushed + * + * Description: + * Flush all pages in @rq. + */ +void rq_flush_dcache_pages(struct request *rq) +{ + struct req_iterator iter; + struct bio_vec *bvec; + + rq_for_each_segment(bvec, rq, iter) + flush_dcache_page(bvec->bv_page); +} +EXPORT_SYMBOL_GPL(rq_flush_dcache_pages); +#endif + /** * blk_lld_busy - Check if underlying low-level drivers of a device are busy * @q : the queue of the device being checked