From 78284dcaf12637bfbb20587a1462594b9f2b730a Mon Sep 17 00:00:00 2001 From: haad Date: Fri, 19 Dec 2008 16:30:41 +0000 Subject: Add infrastructure needed to load device-mapper targets as modules. Targets wasn't converted yet and at least snapshot target will be converted in a near future. --- sys/dev/dm/dm_target_linear.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys/dev/dm/dm_target_linear.c') diff --git a/sys/dev/dm/dm_target_linear.c b/sys/dev/dm/dm_target_linear.c index c65e21fc3a3..e80badfb3ed 100644 --- a/sys/dev/dm/dm_target_linear.c +++ b/sys/dev/dm/dm_target_linear.c @@ -1,4 +1,4 @@ -/* $NetBSD: dm_target_linear.c,v 1.2 2008/12/19 15:24:03 haad Exp $ */ +/* $NetBSD: dm_target_linear.c,v 1.3 2008/12/19 16:30:41 haad Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -176,6 +176,9 @@ dm_target_linear_destroy(dm_table_entry_t *table_en) /* Decrement pdev ref counter if 0 remove it */ dm_pdev_decr(tlc->pdev); + /* Unbusy target so we can unload it */ + dm_target_unbusy(table_en->target); + kmem_free(table_en->target_config, sizeof(dm_target_linear_config_t)); table_en->target_config = NULL; -- cgit