mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
block: make bdev_ops->rw_page() take a REQ_OP instead of bool
c11f0c0b5b ("block/mm: make bdev_ops->rw_page() take a bool for
read/write") replaced @op with boolean @is_write, which limited the
amount of information going into ->rw_page() and more importantly
page_endio(), which removed the need to expose block internals to mm.
Unfortunately, we want to track discards separately and @is_write
isn't enough information. This patch updates bdev_ops->rw_page() to
take REQ_OP instead but leaves page_endio() to take bool @is_write.
This allows the block part of operations to have enough information
while not leaking it to mm.
Signed-off-by: Tejun Heo <[email protected]>
Cc: Mike Christie <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Dan Williams <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
ada94973f1
commit
3f289dcb4b
7 changed files with 34 additions and 33 deletions
|
|
@ -51,8 +51,8 @@ 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, op_is_write(bio_op(bio)),
|
||||
blk_status_to_errno(bio->bi_status));
|
||||
page_endio(page, bio_op(bio),
|
||||
blk_status_to_errno(bio->bi_status));
|
||||
}
|
||||
|
||||
bio_put(bio);
|
||||
|
|
|
|||
Loading…
Reference in a new issue