]> git.neil.brown.name Git - history.git/commit
[PATCH] md 20 of 22 - Provide SMP safe locking for all_mddevs list.
authorNeil Brown <neilb@cse.unsw.edu.au>
Tue, 18 Jun 2002 11:17:48 +0000 (04:17 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Tue, 18 Jun 2002 11:17:48 +0000 (04:17 -0700)
commitf7bbc7e12d9d3a5799f2dd551323f23be682dfd9
tree24b342686f77a02d88f13f4c49a2b5a0ee897492
parent2d35e42d1cdb08f940a9c302c04bd6b24c44cedc
[PATCH] md 20 of 22 - Provide SMP safe locking for all_mddevs list.

Provide SMP safe locking for all_mddevs list.

the all_mddevs_lock is added to protect all_mddevs and mddev_map.

ITERATE_MDDEV is moved to md.c (it isn't needed elsewhere) and enhanced
to take the lock appropriately and always have a refcount on the object
that is given to the body of the loop.

mddev_find is changed so that the structure is allocated outside a lock,
but test-and-set is done inside the lock.
drivers/md/md.c
include/linux/raid/md_k.h