x86, mce: implement panic synchronization
[safe/jmp/linux-2.6] / drivers / md / dm-stripe.c
index b745d8a..41569bc 100644 (file)
@@ -4,7 +4,7 @@
  * This file is released under the GPL.
  */
 
-#include "dm.h"
+#include <linux/device-mapper.h>
 
 #include <linux/module.h>
 #include <linux/init.h>
@@ -60,8 +60,8 @@ static inline struct stripe_c *alloc_context(unsigned int stripes)
 {
        size_t len;
 
-       if (array_too_big(sizeof(struct stripe_c), sizeof(struct stripe),
-                         stripes))
+       if (dm_array_too_big(sizeof(struct stripe_c), sizeof(struct stripe),
+                            stripes))
                return NULL;
 
        len = sizeof(struct stripe_c) + (sizeof(struct stripe) * stripes);
@@ -320,8 +320,10 @@ int __init dm_stripe_init(void)
        int r;
 
        r = dm_register_target(&stripe_target);
-       if (r < 0)
+       if (r < 0) {
                DMWARN("target registration failed");
+               return r;
+       }
 
        kstriped = create_singlethread_workqueue("kstriped");
        if (!kstriped) {
@@ -335,9 +337,7 @@ int __init dm_stripe_init(void)
 
 void dm_stripe_exit(void)
 {
-       if (dm_unregister_target(&stripe_target))
-               DMWARN("target unregistration failed");
-
+       dm_unregister_target(&stripe_target);
        destroy_workqueue(kstriped);
 
        return;