Skip to content

Commit 2d62e6b

Browse files
Hou Puaxboe
authored andcommitted
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: deb78b4 ("nullb: emulate cache") Signed-off-by: Hou Pu <houpu@bytedance.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 0d3b6a8 commit 2d62e6b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/block/null_blk_main.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,7 @@ static int null_handle_rq(struct nullb_cmd *cmd)
11471147
len = bvec.bv_len;
11481148
err = null_transfer(nullb, bvec.bv_page, len, bvec.bv_offset,
11491149
op_is_write(req_op(rq)), sector,
1150-
req_op(rq) & REQ_FUA);
1150+
rq->cmd_flags & REQ_FUA);
11511151
if (err) {
11521152
spin_unlock_irq(&nullb->lock);
11531153
return err;

0 commit comments

Comments
 (0)