From b7a78ac44866c2140e9be132ed7016a28f9d9893 Mon Sep 17 00:00:00 2001 From: Mike Snitzer Date: Mon, 22 Sep 2014 11:29:43 -0400 Subject: [PATCH] dm dedup: check return from dm_set_target_max_io_len --- drivers/md/dm-dedup-target.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/md/dm-dedup-target.c b/drivers/md/dm-dedup-target.c index 699af961d32..00a69585501 100644 --- a/drivers/md/dm-dedup-target.c +++ b/drivers/md/dm-dedup-target.c @@ -684,7 +684,10 @@ static int dm_dedup_ctr_fn(struct dm_target *ti, unsigned int argc, char **argv) dc->flushrq = flushrq; dc->writes_after_flush = 0; - dm_set_target_max_io_len(ti, dc->sectors_per_block); + r = dm_set_target_max_io_len(ti, dc->sectors_per_block); + if (r) + goto bad_kvstore_init; + ti->private = dc; da->meta_dev = da->data_dev = NULL; -- 2.43.0