]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/raid/md_k.h
md: Protect access to mddev->disks list using RCU
[linux-2.6-omap-h63xx.git] / include / linux / raid / md_k.h
index 4bef4791d80df3db59053b2ba5a3aa21ca8d130e..9f2549ac0e2d0133e014739cc7c5843fcb0a4e91 100644 (file)
@@ -339,6 +339,9 @@ static inline char * mdname (mddev_t * mddev)
 #define rdev_for_each(rdev, tmp, mddev)                                \
        rdev_for_each_list(rdev, tmp, (mddev)->disks)
 
+#define rdev_for_each_rcu(rdev, mddev)                         \
+       list_for_each_entry_rcu(rdev, &((mddev)->disks), same_set)
+
 typedef struct mdk_thread_s {
        void                    (*run) (mddev_t *mddev);
        mddev_t                 *mddev;