X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fmd%2Fdm-ioctl.c;h=54ec737195e00f9043a8db9dbc04aff0df09e40f;hb=28d721e24c88496ff8e9c4a0959bdc1415c0658e;hp=200a0688f717c76759c1165cde20652ad14d07f7;hpb=a8b3e6f10f08f66ae1072efd087b30966a3654f6;p=powerpc.git diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 200a0688f7..54ec737195 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -230,11 +230,20 @@ static int dm_hash_insert(const char *name, const char *uuid, struct mapped_devi static void __hash_remove(struct hash_cell *hc) { + struct dm_table *table; + /* remove from the dev hash */ list_del(&hc->uuid_list); list_del(&hc->name_list); unregister_with_devfs(hc); dm_set_mdptr(hc->md, NULL); + + table = dm_get_table(hc->md); + if (table) { + dm_table_event(table); + dm_table_put(table); + } + dm_put(hc->md); if (hc->new_map) dm_table_put(hc->new_map);