]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
dm exception store: fix failed set_chunk_size error path
authorMikulas Patocka <mpatocka@redhat.com>
Fri, 16 Oct 2009 22:18:16 +0000 (23:18 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Nov 2009 00:22:06 +0000 (16:22 -0800)
commit 0e8c4e4e3ebb15756ddc4170a88149a2cd323cfe upstream.

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

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/md/dm-exception-store.c

index 556acff3952fe450e73e4673f46bcac84b453a47..e5de7627c52d919fe5b353c176f4e929d309b2af 100644 (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) {