]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
block-aio-batch-completion-for-bios-kiocbs-fix-fix-fix-fix
authorKent Overstreet <koverstreet@google.com>
Sun, 10 Mar 2013 10:55:46 +0000 (21:55 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 12 Mar 2013 03:57:46 +0000 (14:57 +1100)
Fix broken build when CONFIG_BLOCK=n by pulling common stuff out into a
new header.

Signed-off-by: Kent Overstreet <koverstreet@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/aio.h
include/linux/batch_complete.h [new file with mode: 0644]
include/linux/bio.h

index cde3a5d448e1890adee49ad4c988bd449597523c..a7e4c595825e811cbc98e2aa701ddf50c417a2a8 100644 (file)
@@ -7,7 +7,7 @@
 #include <linux/uio.h>
 #include <linux/rcupdate.h>
 #include <linux/atomic.h>
-#include <linux/rbtree.h>
+#include <linux/batch_complete.h>
 
 struct kioctx;
 struct kiocb;
diff --git a/include/linux/batch_complete.h b/include/linux/batch_complete.h
new file mode 100644 (file)
index 0000000..8167a9d
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef _LINUX_BATCH_COMPLETE_H
+#define _LINUX_BATCH_COMPLETE_H
+
+#include <linux/rbtree.h>
+
+/*
+ * Common stuff to the aio and block code for batch completion. Everything
+ * important is elsewhere:
+ */
+
+struct bio;
+
+struct bio_list {
+       struct bio *head;
+       struct bio *tail;
+};
+
+struct batch_complete {
+       struct bio_list         bio;
+       struct rb_root          kiocb;
+};
+
+#endif
index 28205a054fd402a04da37f54941ab8794538f312..ad62bdbdc8665bf0a167e0d2603e6fe47a53622c 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/mempool.h>
 #include <linux/ioprio.h>
 #include <linux/bug.h>
+#include <linux/batch_complete.h>
 
 #ifdef CONFIG_BLOCK
 
@@ -438,10 +439,6 @@ static inline bool bio_mergeable(struct bio *bio)
  * member of the bio.  The bio_list also caches the last list member to allow
  * fast access to the tail.
  */
-struct bio_list {
-       struct bio *head;
-       struct bio *tail;
-};
 
 static inline int bio_list_empty(const struct bio_list *bl)
 {
@@ -545,11 +542,6 @@ static inline struct bio *bio_list_get(struct bio_list *bl)
        return bio;
 }
 
-struct batch_complete {
-       struct bio_list         bio;
-       struct rb_root          kiocb;
-};
-
 void bio_endio_batch(struct bio *bio, int error, struct batch_complete *batch);
 
 static inline void batch_complete_init(struct batch_complete *batch)