mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
xen/blkback: Fix the inhibition to map pages when discarding sector ranges.
The 'operation' parameters are the ones provided to the bio layer while the req->operation are the ones passed in between the backend and frontend. We used the wrong 'operation' value to squash the call to map pages when processing the discard operation resulting in an hypercall that did nothing. Lets guard against going in the mapping function by checking for the proper operation type. CC: Li Dongyang <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
This commit is contained in:
parent
5c62cb4860
commit
64391b2536
1 changed files with 1 additions and 2 deletions
|
|
@ -707,8 +707,7 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif,
|
|||
* the hypercall to unmap the grants - that is all done in
|
||||
* xen_blkbk_unmap.
|
||||
*/
|
||||
if (operation != BLKIF_OP_DISCARD &&
|
||||
xen_blkbk_map(req, pending_req, seg))
|
||||
if (operation == REQ_DISCARD && xen_blkbk_map(req, pending_req, seg))
|
||||
goto fail_flush;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue