dm integrity: fix missing goto in bitmap_flush_interval error handling

commit 17e9e134a8 upstream.

Fixes: 468dfca38b ("dm integrity: add a bitmap mode")
Cc: stable@vger.kernel.org
Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Tian Tao 2021-04-14 09:43:44 +08:00 committed by Greg Kroah-Hartman
parent ff8fd1e3b5
commit 569bae00eb

View file

@ -3762,6 +3762,7 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv)
if (val >= (uint64_t)UINT_MAX * 1000 / HZ) { if (val >= (uint64_t)UINT_MAX * 1000 / HZ) {
r = -EINVAL; r = -EINVAL;
ti->error = "Invalid bitmap_flush_interval argument"; ti->error = "Invalid bitmap_flush_interval argument";
goto bad;
} }
ic->bitmap_flush_interval = msecs_to_jiffies(val); ic->bitmap_flush_interval = msecs_to_jiffies(val);
} else if (!strncmp(opt_string, "internal_hash:", strlen("internal_hash:"))) { } else if (!strncmp(opt_string, "internal_hash:", strlen("internal_hash:"))) {