Skip to content

Commit

Permalink
md/raid5: add missing spin_lock_init.
Browse files Browse the repository at this point in the history
commit b17459c
   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>
  • Loading branch information
neilbrown committed Sep 24, 2012
1 parent 6dafab6 commit cb13ff6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/md/raid5.c
Expand Up @@ -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);
}
Expand Down

0 comments on commit cb13ff6

Please sign in to comment.