]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/md/raid5.c
arch: Mass conversion of smp_mb__*()
[karo-tx-linux.git] / drivers / md / raid5.c
index 25247a8529124f7cc93eda0db7033655d52f2ef7..2afef4ec9312d222bb51e76fbce26f254e564cf0 100644 (file)
@@ -4370,8 +4370,7 @@ static struct stripe_head *__get_priority_stripe(struct r5conf *conf, int group)
                sh->group = NULL;
        }
        list_del_init(&sh->lru);
-       atomic_inc(&sh->count);
-       BUG_ON(atomic_read(&sh->count) != 1);
+       BUG_ON(atomic_inc_return(&sh->count) != 1);
        return sh;
 }
 
@@ -4401,7 +4400,7 @@ static void raid5_unplug(struct blk_plug_cb *blk_cb, bool from_schedule)
                         * STRIPE_ON_UNPLUG_LIST clear but the stripe
                         * is still in our list
                         */
-                       smp_mb__before_clear_bit();
+                       smp_mb__before_atomic();
                        clear_bit(STRIPE_ON_UNPLUG_LIST, &sh->state);
                        /*
                         * STRIPE_ON_RELEASE_LIST could be set here. In that