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/uio.h>
#include <linux/rcupdate.h>
#include <linux/atomic.h>
-#include <linux/rbtree.h>
+#include <linux/batch_complete.h>
struct kioctx;
struct kiocb;
--- /dev/null
+#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
#include <linux/mempool.h>
#include <linux/ioprio.h>
#include <linux/bug.h>
+#include <linux/batch_complete.h>
#ifdef CONFIG_BLOCK
* 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)
{
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)