]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/md/faulty.c
md: Move check for bitmap presence to personality code.
[karo-tx-linux.git] / drivers / md / faulty.c
index 6e83b38d931d6be62ad51e2855cf6008373abf80..87d88dbb667f2abdb83190b5d1fc1ac3d19cb1ba 100644 (file)
@@ -299,8 +299,12 @@ static int run(mddev_t *mddev)
 {
        mdk_rdev_t *rdev;
        int i;
+       conf_t *conf;
 
-       conf_t *conf = kmalloc(sizeof(*conf), GFP_KERNEL);
+       if (md_check_no_bitmap(mddev))
+               return -EINVAL;
+
+       conf = kmalloc(sizeof(*conf), GFP_KERNEL);
        if (!conf)
                return -ENOMEM;