md: fix clearing of 'blocked' flag in the presence of bad blocks.
[deliverable/linux.git] / drivers / md / md.c
index aca6117112645c3e8bb47d1aea166e34480c4d11..3742ce8b0acf6b70cf119bc412654c94ec0aa165 100644 (file)
@@ -2592,7 +2592,7 @@ state_store(mdk_rdev_t *rdev, const char *buf, size_t len)
                err = 0;
        } else if (cmd_match(buf, "-blocked")) {
                if (!test_bit(Faulty, &rdev->flags) &&
-                   test_bit(BlockedBadBlocks, &rdev->flags)) {
+                   rdev->badblocks.unacked_exist) {
                        /* metadata handler doesn't understand badblocks,
                         * so we need to fail the device
                         */
This page took 0.02799 seconds and 5 git commands to generate.