Merge branch 'misc' into for-linus
[firefly-linux-kernel-4.4.55.git] / drivers / md / raid1.c
index f4622dd8fc590b2bbcaee444b24ab2f55336503d..d9587dffe533e69c81b6adf5221ee1da745cfa4b 100644 (file)
@@ -2562,8 +2562,7 @@ static int stop(mddev_t *mddev)
        raise_barrier(conf);
        lower_barrier(conf);
 
-       md_unregister_thread(mddev->thread);
-       mddev->thread = NULL;
+       md_unregister_thread(&mddev->thread);
        if (conf->r1bio_pool)
                mempool_destroy(conf->r1bio_pool);
        kfree(conf->mirrors);