Commit 2d62e6b0 authored by Hou Pu's avatar Hou Pu Committed by Jens Axboe

null_blk: fix passing of REQ_FUA flag in null_handle_rq

REQ_FUA should be checked using rq->cmd_flags instead of req_op().

Fixes: deb78b41 ("nullb: emulate cache")
Signed-off-by: default avatarHou Pu <houpu@bytedance.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 0d3b6a8d
......@@ -1147,7 +1147,7 @@ static int null_handle_rq(struct nullb_cmd *cmd)
len = bvec.bv_len;
err = null_transfer(nullb, bvec.bv_page, len, bvec.bv_offset,
op_is_write(req_op(rq)), sector,
req_op(rq) & REQ_FUA);
rq->cmd_flags & REQ_FUA);
if (err) {
spin_unlock_irq(&nullb->lock);
return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment