Skip to content

Commit 4cb6f22

Browse files
John Dorminysnitm
authored andcommitted
dm ebs: Fix incorrect checking for REQ_OP_FLUSH
REQ_OP_FLUSH was being treated as a flag, but the operation part of bio->bi_opf must be treated as a whole. Change to accessing the operation part via bio_op(bio) and checking for equality. Signed-off-by: John Dorminy <[email protected]> Acked-by: Heinz Mauelshagen <[email protected]> Fixes: d3c7b35 ("dm: add emulated block size target") Cc: [email protected] Signed-off-by: Mike Snitzer <[email protected]>
1 parent 90e6bf0 commit 4cb6f22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/md/dm-ebs-target.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ static int ebs_map(struct dm_target *ti, struct bio *bio)
363363
bio_set_dev(bio, ec->dev->bdev);
364364
bio->bi_iter.bi_sector = ec->start + dm_target_offset(ti, bio->bi_iter.bi_sector);
365365

366-
if (unlikely(bio->bi_opf & REQ_OP_FLUSH))
366+
if (unlikely(bio_op(bio) == REQ_OP_FLUSH))
367367
return DM_MAPIO_REMAPPED;
368368
/*
369369
* Only queue for bufio processing in case of partial or overlapping buffers

0 commit comments

Comments
 (0)