dm exception store: fix failed set_chunk_size error path

Properly close the device if failing because of an invalid chunk size.

Cc: stable@kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
This commit is contained in:
Mikulas Patocka 2009-10-16 23:18:16 +01:00 committed by Alasdair G Kergon
parent 3f2412dc85
commit 0e8c4e4e3e

View file

@ -251,7 +251,7 @@ int dm_exception_store_create(struct dm_target *ti, int argc, char **argv,
r = set_chunk_size(tmp_store, argv[2], &ti->error);
if (r)
goto bad_cow;
goto bad_ctr;
r = type->ctr(tmp_store, 0, NULL);
if (r) {