aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2017-07-21 11:56:46 -0400
committerMike Snitzer <snitzer@redhat.com>2017-07-25 15:12:17 -0400
commitedbe9597aca2e2601e6e152bdea200b6cf1b8b47 (patch)
tree767424385e9137e6c4d1dfe0884fc544f23ba3ce
parentac6a318888f6b94925de603d4563edf7e86e04c8 (diff)
dm zoned: remove test for impossible REQ_OP_FLUSH conditions
The value REQ_OP_FLUSH is only used by the block code for request-based devices. Remove the tests for REQ_OP_FLUSH from the bio-based dm-zoned-target. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
-rw-r--r--drivers/md/dm-zoned-target.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-zoned-target.c b/drivers/md/dm-zoned-target.c
index 2b538fa817f4..71eae8a23dae 100644
--- a/drivers/md/dm-zoned-target.c
+++ b/drivers/md/dm-zoned-target.c
@@ -588,7 +588,7 @@ static int dmz_map(struct dm_target *ti, struct bio *bio)
588 588
589 bio->bi_bdev = dev->bdev; 589 bio->bi_bdev = dev->bdev;
590 590
591 if (!nr_sectors && (bio_op(bio) != REQ_OP_FLUSH) && (bio_op(bio) != REQ_OP_WRITE)) 591 if (!nr_sectors && bio_op(bio) != REQ_OP_WRITE)
592 return DM_MAPIO_REMAPPED; 592 return DM_MAPIO_REMAPPED;
593 593
594 /* The BIO should be block aligned */ 594 /* The BIO should be block aligned */
@@ -603,7 +603,7 @@ static int dmz_map(struct dm_target *ti, struct bio *bio)
603 bioctx->status = BLK_STS_OK; 603 bioctx->status = BLK_STS_OK;
604 604
605 /* Set the BIO pending in the flush list */ 605 /* Set the BIO pending in the flush list */
606 if (bio_op(bio) == REQ_OP_FLUSH || (!nr_sectors && bio_op(bio) == REQ_OP_WRITE)) { 606 if (!nr_sectors && bio_op(bio) == REQ_OP_WRITE) {
607 spin_lock(&dmz->flush_lock); 607 spin_lock(&dmz->flush_lock);
608 bio_list_add(&dmz->flush_list, bio); 608 bio_list_add(&dmz->flush_list, bio);
609 spin_unlock(&dmz->flush_lock); 609 spin_unlock(&dmz->flush_lock);