]> git.baikalelectronics.ru Git - kernel.git/commit
dm table: rework reference counting fix
authorMikulas Patocka <mpatocka@redhat.com>
Mon, 16 Mar 2009 17:44:26 +0000 (17:44 +0000)
committerAlasdair G Kergon <agk@redhat.com>
Mon, 16 Mar 2009 17:44:26 +0000 (17:44 +0000)
commitfa1b8758f3eaaa46922fec27961131fbd35bd816
tree41c0d0b924dc392adb413ef4ebe35bb42ef24727
parentf5fce5ec89fc9c1c12f24921d6efb630b5950e95
dm table: rework reference counting fix

Fix an error introduced in dm-table-rework-reference-counting.patch.

When there is failure after table initialization, we need to use
dm_table_destroy, not dm_table_put, to free the table.

dm_table_put may be used only after dm_table_get.

Cc: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reviewed-by: Jonathan Brassow <jbrassow@redhat.com>
Reviewed-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-ioctl.c