dm-crypt: fix reset commit error

This commit is contained in:
xxmustafacooTR 2023-02-21 00:50:39 +03:00
parent 7735f1d860
commit ac88baa87e
No known key found for this signature in database
GPG key ID: 520B6FE385CBF5C9

View file

@ -1810,8 +1810,7 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv)
mutex_init(&cc->bio_alloc_lock); mutex_init(&cc->bio_alloc_lock);
ret = -EINVAL; ret = -EINVAL;
if ((sscanf(argv[2], "%llu%c", &tmpll, &dummy) != 1) || if (sscanf(argv[2], "%llu%c", &tmpll, &dummy) != 1) {
(tmpll & ((cc->sector_size >> SECTOR_SHIFT) - 1))) {
ti->error = "Invalid iv_offset sector"; ti->error = "Invalid iv_offset sector";
goto bad; goto bad;
} }
@ -2069,8 +2068,6 @@ static int crypt_iterate_devices(struct dm_target *ti,
static void crypt_io_hints(struct dm_target *ti, struct queue_limits *limits) static void crypt_io_hints(struct dm_target *ti, struct queue_limits *limits)
{ {
struct crypt_config *cc = ti->private;
/* /*
* Unfortunate constraint that is required to avoid the potential * Unfortunate constraint that is required to avoid the potential
* for exceeding underlying device's max_segments limits -- due to * for exceeding underlying device's max_segments limits -- due to