diff options
| author | haad <haad@NetBSD.org> | 2009-02-19 23:07:32 +0000 |
|---|---|---|
| committer | haad <haad@NetBSD.org> | 2009-02-19 23:07:32 +0000 |
| commit | 17599f37f30989c9b5031c73f1c170f363299b72 (patch) | |
| tree | 843308771fc90d128f9a43d513d8eb17cbb296e2 /sys/dev/dm/dm_target_error.c | |
| parent | 7184d23274d3c615121a34f168cf65f51157e9c5 (diff) | |
Add support for autoloading of device-mapper targets modules. Add
dm_target_autoload function which tries to load target module. Fix two
deadlocks in dm_table_load_ioctl error path(I forgot to call dm_dev_unbusy).
Diffstat (limited to 'sys/dev/dm/dm_target_error.c')
| -rw-r--r-- | sys/dev/dm/dm_target_error.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/dm/dm_target_error.c b/sys/dev/dm/dm_target_error.c index e404753e421..ce5b4def93b 100644 --- a/sys/dev/dm/dm_target_error.c +++ b/sys/dev/dm/dm_target_error.c @@ -1,4 +1,4 @@ -/* $NetBSD: dm_target_error.c,v 1.6 2009/01/14 00:56:15 haad Exp $ */ +/* $NetBSD: dm_target_error.c,v 1.7 2009/02/19 23:07:33 haad Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -61,9 +61,10 @@ dm_target_error_modcmd(modcmd_t cmd, void *arg) switch (cmd) { case MODULE_CMD_INIT: - if ((dmt = dm_target_lookup("error")) != NULL) + if ((dmt = dm_target_lookup("error")) != NULL){ + dm_target_unbusy(dmt); return EEXIST; - + } dmt = dm_target_alloc("error"); dmt->version[0] = 1; |
