diff options
author | Mike Snitzer <snitzer@kernel.org> | 2022-03-30 19:52:10 +0200 |
---|---|---|
committer | Mike Snitzer <snitzer@kernel.org> | 2022-05-05 23:31:35 +0200 |
commit | e86f2b005a51437d2887eec5ee659d0287d370ad (patch) | |
tree | ae524bcfe2ae9d84aca33a86285dee242bc9ee02 /drivers/md/dm-flakey.c | |
parent | dm: conditionally enable branching for less used features (diff) | |
download | linux-e86f2b005a51437d2887eec5ee659d0287d370ad.tar.xz linux-e86f2b005a51437d2887eec5ee659d0287d370ad.zip |
dm: simplify basic targets
Remove needless factoring and remap bi_sector regardless of
bio_sectors() being non-zero.
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md/dm-flakey.c')
-rw-r--r-- | drivers/md/dm-flakey.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/md/dm-flakey.c b/drivers/md/dm-flakey.c index 345229d7e59c..f2305eb758a2 100644 --- a/drivers/md/dm-flakey.c +++ b/drivers/md/dm-flakey.c @@ -280,9 +280,7 @@ static void flakey_map_bio(struct dm_target *ti, struct bio *bio) struct flakey_c *fc = ti->private; bio_set_dev(bio, fc->dev->bdev); - if (bio_sectors(bio) || op_is_zone_mgmt(bio_op(bio))) - bio->bi_iter.bi_sector = - flakey_map_sector(ti, bio->bi_iter.bi_sector); + bio->bi_iter.bi_sector = flakey_map_sector(ti, bio->bi_iter.bi_sector); } static void corrupt_bio_data(struct bio *bio, struct flakey_c *fc) |