Skip to content

Commit

Permalink
null_blk: fix checking for REQ_FUA
Browse files Browse the repository at this point in the history
null_handle_bio() erroneously uses the bio_op macro
which masks respective request flag bits including REQ_FUA
out thus failing the check.

Fix by checking bio->bi_opf directly.

Signed-off-by: Heinz Mauelshagen <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
mauelsha authored and axboe committed Feb 28, 2019
1 parent 4d7c1d3 commit bf7c7a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/block/null_blk_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@ static int null_handle_bio(struct nullb_cmd *cmd)
len = bvec.bv_len;
err = null_transfer(nullb, bvec.bv_page, len, bvec.bv_offset,
op_is_write(bio_op(bio)), sector,
bio_op(bio) & REQ_FUA);
bio->bi_opf & REQ_FUA);
if (err) {
spin_unlock_irq(&nullb->lock);
return err;
Expand Down

0 comments on commit bf7c7a0

Please sign in to comment.