summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm.c
diff options
context:
space:
mode:
authorMike Anderson <andmike@linux.vnet.ibm.com>2007-10-19 22:48:00 +0100
committerAlasdair G Kergon <agk@redhat.com>2007-10-20 02:01:24 +0100
commit51e5b2bd34ded40ef48cade8a6a8f1baa0b4275e (patch)
tree7c1650dcd2f53bed2c0b8c9538e8da2d2d1286c2 /drivers/md/dm.c
parent96a1f7dba6e464155c0d1dc69c6c2efa96b644ac (diff)
downloadop-kernel-dev-51e5b2bd34ded40ef48cade8a6a8f1baa0b4275e.zip
op-kernel-dev-51e5b2bd34ded40ef48cade8a6a8f1baa0b4275e.tar.gz
dm: add uevent to core
This patch adds a uevent skeleton to device-mapper. Signed-off-by: Mike Anderson <andmike@linux.vnet.ibm.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r--drivers/md/dm.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 41c9549..bb5c1ea 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -7,6 +7,7 @@
#include "dm.h"
#include "dm-bio-list.h"
+#include "dm-uevent.h"
#include <linux/init.h>
#include <linux/module.h>
@@ -143,11 +144,19 @@ static int __init local_init(void)
return -ENOMEM;
}
+ r = dm_uevent_init();
+ if (r) {
+ kmem_cache_destroy(_tio_cache);
+ kmem_cache_destroy(_io_cache);
+ return r;
+ }
+
_major = major;
r = register_blkdev(_major, _name);
if (r < 0) {
kmem_cache_destroy(_tio_cache);
kmem_cache_destroy(_io_cache);
+ dm_uevent_exit();
return r;
}
@@ -162,6 +171,7 @@ static void local_exit(void)
kmem_cache_destroy(_tio_cache);
kmem_cache_destroy(_io_cache);
unregister_blkdev(_major, _name);
+ dm_uevent_exit();
_major = 0;
OpenPOWER on IntegriCloud