diff options
| author | Neil Brown <neilb@cse.unsw.edu.au> | 2002-06-18 04:17:48 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-06-18 04:17:48 -0700 |
| commit | f7bbc7e12d9d3a5799f2dd551323f23be682dfd9 (patch) | |
| tree | 24b342686f77a02d88f13f4c49a2b5a0ee897492 /include | |
| parent | 2d35e42d1cdb08f940a9c302c04bd6b24c44cedc (diff) | |
[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.
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/raid/md_k.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index 3352cbca5308..c1db880110c0 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h @@ -277,16 +277,6 @@ extern mdp_disk_t *get_spare(mddev_t *mddev); #define ITERATE_RDEV_PENDING(rdev,tmp) \ ITERATE_RDEV_GENERIC(pending_raid_disks,pending,rdev,tmp) -/* - * iterates through all used mddevs in the system. - */ -#define ITERATE_MDDEV(mddev,tmp) \ - \ - for (tmp = all_mddevs.next; \ - mddev = list_entry(tmp, mddev_t, all_mddevs), \ - tmp = tmp->next, tmp->prev != &all_mddevs \ - ; ) - #define xchg_values(x,y) do { __typeof__(x) __tmp = x; \ x = y; y = __tmp; } while (0) |
