summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-verity-target.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2024-11-18 16:15:20 +0100
committerMikulas Patocka <mpatocka@redhat.com>2024-11-20 11:44:44 +0100
commita573e404cbf269d46b3a96b18f7316aa57161fdf (patch)
tree71e43682bd825527040378ba6fd40077125c48bd /drivers/md/dm-verity-target.c
parentdm-bufio: use kmalloc to allocate power-of-two sized buffers (diff)
downloadlinux-a573e404cbf269d46b3a96b18f7316aa57161fdf.tar.xz
linux-a573e404cbf269d46b3a96b18f7316aa57161fdf.zip
dm-verity: remove the unused "data_start" variable
Remove the unused "data_start" variable. It is always set to zero and the user can't override it. If the user needs to use some existing offset within a block device, it is possible to use the linear target. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Diffstat (limited to 'drivers/md/dm-verity-target.c')
-rw-r--r--drivers/md/dm-verity-target.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/dm-verity-target.c b/drivers/md/dm-verity-target.c
index c142ec5458b7..47d595f6a76e 100644
--- a/drivers/md/dm-verity-target.c
+++ b/drivers/md/dm-verity-target.c
@@ -93,7 +93,7 @@ static void dm_bufio_alloc_callback(struct dm_buffer *buf)
*/
static sector_t verity_map_sector(struct dm_verity *v, sector_t bi_sector)
{
- return v->data_start + dm_target_offset(v->ti, bi_sector);
+ return dm_target_offset(v->ti, bi_sector);
}
/*
@@ -952,7 +952,7 @@ static int verity_prepare_ioctl(struct dm_target *ti, struct block_device **bdev
*bdev = v->data_dev->bdev;
- if (v->data_start || ti->len != bdev_nr_sectors(v->data_dev->bdev))
+ if (ti->len != bdev_nr_sectors(v->data_dev->bdev))
return 1;
return 0;
}
@@ -962,7 +962,7 @@ static int verity_iterate_devices(struct dm_target *ti,
{
struct dm_verity *v = ti->private;
- return fn(ti, v->data_dev, v->data_start, ti->len, data);
+ return fn(ti, v->data_dev, 0, ti->len, data);
}
static void verity_io_hints(struct dm_target *ti, struct queue_limits *limits)