Commit 515903c1 authored by Hou Pu's avatar Hou Pu Committed by Greg Kroah-Hartman

null_blk: fix passing of REQ_FUA flag in null_handle_rq

[ Upstream commit 2d62e6b0 ]

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>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 0ece3009
...@@ -1086,7 +1086,7 @@ static int null_handle_rq(struct nullb_cmd *cmd) ...@@ -1086,7 +1086,7 @@ static int null_handle_rq(struct nullb_cmd *cmd)
len = bvec.bv_len; len = bvec.bv_len;
err = null_transfer(nullb, bvec.bv_page, len, bvec.bv_offset, err = null_transfer(nullb, bvec.bv_page, len, bvec.bv_offset,
op_is_write(req_op(rq)), sector, op_is_write(req_op(rq)), sector,
req_op(rq) & REQ_FUA); rq->cmd_flags & REQ_FUA);
if (err) { if (err) {
spin_unlock_irq(&nullb->lock); spin_unlock_irq(&nullb->lock);
return err; 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