md/raid5: add missing spin_lock_init.
authorNeilBrown <neilb@suse.de>
Mon, 24 Sep 2012 06:27:20 +0000 (16:27 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 24 Sep 2012 06:27:20 +0000 (16:27 +1000)
commit b17459c05000fdbe8d10946570a26510f86ec0f
   raid5: add a per-stripe lock

added a spin_lock to the 'stripe_head' struct.
Unfortunately there are two places where this struct is allocated
but the spin lock was only initialised in one of them.

So add the missing spin_lock_init.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid5.c

index 7031b865b3a030488614764528295d509c663ba5..0689173fd9f568583708c53396631ac8e1838c55 100644 (file)
@@ -1591,6 +1591,7 @@ static int resize_stripes(struct r5conf *conf, int newsize)
                #ifdef CONFIG_MULTICORE_RAID456
                init_waitqueue_head(&nsh->ops.wait_for_ops);
                #endif
+               spin_lock_init(&nsh->stripe_lock);
 
                list_add(&nsh->lru, &newstripes);
        }