Mike Snitzer dddf305640 dm: fix zoned locking imbalance due to needless check in clone_endio
After the commit ca522482e3ea ("dm: pass NULL bdev to bio_alloc_clone"),
clone_endio() only calls dm_zone_endio() when DM targets remap the
clone bio's bdev to something other than the md->disk->part0 default.

However, if a DM target (e.g. dm-crypt) stacked ontop of a dm-zoned
does not remap the clone bio using bio_set_dev() then dm_zone_endio()
is not called at completion of the bios and zone locks are not
properly unlocked. This triggers a hang, in dm_zone_map_bio(), when
blktests block/004 is run for dm-crypt on zoned block devices. To
avoid the hang, simply remove the clone_endio() check that verifies
the target remapped the clone bio to a device other than the default.

Fixes: ca522482e3ea ("dm: pass NULL bdev to bio_alloc_clone")
Reported-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
2022-06-10 15:23:54 -04:00
..
2022-06-03 10:25:56 -07:00
2022-06-08 14:04:14 -04:00
2022-05-05 17:31:35 -04:00
2022-05-05 17:31:35 -04:00
2022-05-27 15:49:30 -07:00
2022-05-27 15:49:30 -07:00
2022-06-08 14:04:14 -04:00
2022-06-08 14:04:14 -04:00
2022-06-08 14:04:14 -04:00
2022-05-22 23:07:21 -07:00
2022-05-22 23:07:22 -07:00
2022-03-08 15:16:54 -08:00
2022-05-22 23:07:21 -07:00
2022-03-08 15:16:54 -08:00
2019-03-12 10:15:18 -07:00
2022-05-22 23:07:21 -07:00
2022-05-22 23:07:21 -07:00
2022-05-22 23:07:21 -07:00
2022-03-08 15:16:54 -08:00