Commit bf7c7a04 authored by Heinz Mauelshagen's avatar Heinz Mauelshagen Committed by Jens Axboe
Browse files

null_blk: fix checking for REQ_FUA



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: default avatarHeinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 4d7c1d3f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;