diff options
author | Heinz Mauelshagen <heinzm@redhat.com> | 2019-02-22 20:00:01 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-02-28 14:03:03 -0700 |
commit | bf7c7a04014678c6880642936e3d420cdfe453bc (patch) | |
tree | 49052810455b8c0a95a30f61fe0bcbf785d6f4a5 /drivers/block | |
parent | 4d7c1d3fd7c7eda7dea351f071945e843a46c145 (diff) | |
download | linux-bf7c7a04014678c6880642936e3d420cdfe453bc.tar.bz2 |
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: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/null_blk_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/null_blk_main.c b/drivers/block/null_blk_main.c index 83c38a6217d7..417a9f15c116 100644 --- a/drivers/block/null_blk_main.c +++ b/drivers/block/null_blk_main.c @@ -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; |