mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
block/mm: make bdev_ops->rw_page() take a bool for read/write
Commit abf545484d
changed it from an 'rw' flags type to the
newer ops based interface, but now we're effectively leaking
some bdev internals to the rest of the kernel. Since we only
care about whether it's a read or a write at that level, just
pass in a bool 'is_write' parameter instead.
Then we can also move op_is_write() and friends back under
CONFIG_BLOCK protection.
Reviewed-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
@@ -50,7 +50,7 @@ static void mpage_end_io(struct bio *bio)
|
||||
|
||||
bio_for_each_segment_all(bv, bio, i) {
|
||||
struct page *page = bv->bv_page;
|
||||
page_endio(page, bio_op(bio), bio->bi_error);
|
||||
page_endio(page, op_is_write(bio_op(bio)), bio->bi_error);
|
||||
}
|
||||
|
||||
bio_put(bio);
|
||||
|
Reference in New Issue
Block a user