diff options
author | Mike Snitzer <snitzer@kernel.org> | 2022-03-30 13:52:10 -0400 |
---|---|---|
committer | Mike Snitzer <snitzer@kernel.org> | 2022-05-05 17:31:35 -0400 |
commit | e86f2b005a51437d2887eec5ee659d0287d370ad (patch) | |
tree | ae524bcfe2ae9d84aca33a86285dee242bc9ee02 /drivers/md/dm-delay.c | |
parent | 442761fd2b297d65d1cb5786249e1e07a19e9122 (diff) | |
download | linux-e86f2b005a51437d2887eec5ee659d0287d370ad.tar.gz linux-e86f2b005a51437d2887eec5ee659d0287d370ad.tar.bz2 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-delay.c')
-rw-r--r-- | drivers/md/dm-delay.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/dm-delay.c b/drivers/md/dm-delay.c index 9a51bf51a859..869afef5654a 100644 --- a/drivers/md/dm-delay.c +++ b/drivers/md/dm-delay.c @@ -296,8 +296,7 @@ static int delay_map(struct dm_target *ti, struct bio *bio) } delayed->class = c; bio_set_dev(bio, c->dev->bdev); - if (bio_sectors(bio)) - bio->bi_iter.bi_sector = c->start + dm_target_offset(ti, bio->bi_iter.bi_sector); + bio->bi_iter.bi_sector = c->start + dm_target_offset(ti, bio->bi_iter.bi_sector); return delay_bio(dc, c, bio); } |