Skip to content

Commit

Permalink
xen/blkback: Check for proper operation.
Browse files Browse the repository at this point in the history
The patch titled: "xen/blkback: Fix the inhibition to map pages
when discarding sector ranges." had the right idea except that
it used the wrong comparison operator. It had == instead of !=.

This fixes the bug where all (except discard) operations would
have been ignored.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
  • Loading branch information
Konrad Rzeszutek Wilk committed Oct 14, 2011
1 parent 64391b2 commit dda1852
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/block/xen-blkback/blkback.c
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +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 == REQ_DISCARD && xen_blkbk_map(req, pending_req, seg))
if (operation != REQ_DISCARD && xen_blkbk_map(req, pending_req, seg))
goto fail_flush;

/*
Expand Down

0 comments on commit dda1852

Please sign in to comment.