summaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorHou Pu <houpu@bytedance.com>2020-08-21 04:34:42 -0400
committerJens Axboe <axboe@kernel.dk>2020-08-21 17:14:28 -0600
commit2d62e6b038e729c3e4bfbfcfbd44800ef0883680 (patch)
tree896d1e0c9ba750c9d1066d50288a1923aec7fe39 /drivers/block
parent0d3b6a8d213a30387b5104b2fb25376d18636f23 (diff)
downloadlinux-2d62e6b038e729c3e4bfbfcfbd44800ef0883680.tar.gz
linux-2d62e6b038e729c3e4bfbfcfbd44800ef0883680.tar.bz2
linux-2d62e6b038e729c3e4bfbfcfbd44800ef0883680.zip
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: deb78b419dfda ("nullb: emulate cache") Signed-off-by: Hou Pu <houpu@bytedance.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/null_blk_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/null_blk_main.c b/drivers/block/null_blk_main.c
index 47a9dad880af..d74443a9c8fa 100644
--- a/drivers/block/null_blk_main.c
+++ b/drivers/block/null_blk_main.c
@@ -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;