summaryrefslogtreecommitdiff
path: root/include/linux/raid
diff options
context:
space:
mode:
authorNeil Brown <neilb@cse.unsw.edu.au>2002-06-18 04:17:48 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-06-18 04:17:48 -0700
commitf7bbc7e12d9d3a5799f2dd551323f23be682dfd9 (patch)
tree24b342686f77a02d88f13f4c49a2b5a0ee897492 /include/linux/raid
parent2d35e42d1cdb08f940a9c302c04bd6b24c44cedc (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/linux/raid')
-rw-r--r--include/linux/raid/md_k.h10
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)