Merge branch 'for-linus' of git://neil.brown.name/md
[pandora-kernel.git] / drivers / md / dm-bio-list.h
index c6be888..d4509be 100644 (file)
@@ -8,7 +8,8 @@
 #define DM_BIO_LIST_H
 
 #include <linux/bio.h>
-#include <linux/prefetch.h>
+
+#ifdef CONFIG_BLOCK
 
 struct bio_list {
        struct bio *head;
@@ -20,19 +21,13 @@ static inline int bio_list_empty(const struct bio_list *bl)
        return bl->head == NULL;
 }
 
-#define BIO_LIST_INIT { .head = NULL, .tail = NULL }
-
-#define BIO_LIST(bl) \
-       struct bio_list bl = BIO_LIST_INIT
-
 static inline void bio_list_init(struct bio_list *bl)
 {
        bl->head = bl->tail = NULL;
 }
 
 #define bio_list_for_each(bio, bl) \
-       for (bio = (bl)->head; bio && ({ prefetch(bio->bi_next); 1; }); \
-            bio = bio->bi_next)
+       for (bio = (bl)->head; bio; bio = bio->bi_next)
 
 static inline unsigned bio_list_size(const struct bio_list *bl)
 {
@@ -108,4 +103,5 @@ static inline struct bio *bio_list_get(struct bio_list *bl)
        return bio;
 }
 
+#endif /* CONFIG_BLOCK */
 #endif