[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.
Showing
Please register or sign in to comment