summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-thin.c
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@kernel.org>2023-05-15 22:21:38 +0200
committerMike Snitzer <snitzer@kernel.org>2023-06-17 00:24:13 +0200
commitc0a7a0ac0707a123f936daccf6639ce1c48840d5 (patch)
tree099d3a95505a29bbf37635255ba7d98a9d608daf /drivers/md/dm-thin.c
parentdm flakey: introduce random_read_corrupt and random_write_corrupt options (diff)
downloadlinux-c0a7a0ac0707a123f936daccf6639ce1c48840d5.tar.xz
linux-c0a7a0ac0707a123f936daccf6639ce1c48840d5.zip
dm thin: remove return code variable in pool_map
Always returns DM_MAPIO_REMAPPED so no need for variable. Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md/dm-thin.c')
-rw-r--r--drivers/md/dm-thin.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
index 464c6b678417..ed1b7f564481 100644
--- a/drivers/md/dm-thin.c
+++ b/drivers/md/dm-thin.c
@@ -3447,7 +3447,6 @@ out_unlock:
static int pool_map(struct dm_target *ti, struct bio *bio)
{
- int r;
struct pool_c *pt = ti->private;
struct pool *pool = pt->pool;
@@ -3456,10 +3455,9 @@ static int pool_map(struct dm_target *ti, struct bio *bio)
*/
spin_lock_irq(&pool->lock);
bio_set_dev(bio, pt->data_dev->bdev);
- r = DM_MAPIO_REMAPPED;
spin_unlock_irq(&pool->lock);
- return r;
+ return DM_MAPIO_REMAPPED;
}
static int maybe_resize_data_dev(struct dm_target *ti, bool *need_commit)