dm-snap: simplify the origin_dev == cow_dev check in snapshot_ctr
authorChristoph Hellwig <hch@lst.de>
Wed, 31 May 2023 12:55:28 +0000 (14:55 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 5 Jun 2023 16:57:40 +0000 (10:57 -0600)
commit26110d5afe8117d1b505fe735ac709bdf063f4da
treef47a47f513a338e49a43e5fda27945f33d271cab
parent7cadcaf1d82618852745e7206fffa2c72c17ce4b
dm-snap: simplify the origin_dev == cow_dev check in snapshot_ctr

Use the block_device acquired in dm_get_device for the check instead
of doing an extra lookup.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mike Snitzer <snitzer@kernel.org>
Link: https://lore.kernel.org/r/20230531125535.676098-18-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/dm-snap.c