Skip to content

Commit

Permalink
dm exception store: fix failed set_chunk_size error path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mikulas Patocka authored and Alasdair G Kergon committed Oct 16, 2009
1 parent 3f2412d commit 0e8c4e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/dm-exception-store.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0e8c4e4

Please sign in to comment.