]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
aio: move private stuff out of aio.h
authorKent Overstreet <koverstreet@google.com>
Tue, 7 May 2013 23:18:33 +0000 (16:18 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 8 May 2013 01:38:28 +0000 (18:38 -0700)
Signed-off-by: Kent Overstreet <koverstreet@google.com>
Cc: Zach Brown <zab@redhat.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Asai Thambi S P <asamymuthupa@micron.com>
Cc: Selvan Mani <smani@micron.com>
Cc: Sam Bradshaw <sbradshaw@micron.com>
Acked-by: Jeff Moyer <jmoyer@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Benjamin LaHaise <bcrl@kvack.org>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/usb/gadget/inode.c
fs/aio.c
include/linux/aio.h

index 32bcbeba119ec755387e45b6e8898057e8c29789..994e7433e87afaaabe46b934356e30a46a959b08 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/slab.h>
 #include <linux/poll.h>
 #include <linux/mmu_context.h>
+#include <linux/aio.h>
 
 #include <linux/device.h>
 #include <linux/moduleparam.h>
index dbfcd67003ef86d85addfd2e5bdcaab3e43864ac..670cb8b843455ae1a78c8da9adcb498d6457db8f 100644 (file)
--- a/fs/aio.c
+++ b/fs/aio.c
 #define dprintk(x...)  do { ; } while (0)
 #endif
 
+#define AIO_RING_MAGIC                 0xa10a10a1
+#define AIO_RING_COMPAT_FEATURES       1
+#define AIO_RING_INCOMPAT_FEATURES     0
+struct aio_ring {
+       unsigned        id;     /* kernel internal index number */
+       unsigned        nr;     /* number of io_events */
+       unsigned        head;
+       unsigned        tail;
+
+       unsigned        magic;
+       unsigned        compat_features;
+       unsigned        incompat_features;
+       unsigned        header_length;  /* size of aio_ring */
+
+
+       struct io_event         io_events[0];
+}; /* 128 bytes + ring size */
+
+#define AIO_RING_PAGES 8
+struct aio_ring_info {
+       unsigned long           mmap_base;
+       unsigned long           mmap_size;
+
+       struct page             **ring_pages;
+       spinlock_t              ring_lock;
+       long                    nr_pages;
+
+       unsigned                nr, tail;
+
+       struct page             *internal_pages[AIO_RING_PAGES];
+};
+
+static inline unsigned aio_ring_avail(struct aio_ring_info *info,
+                                       struct aio_ring *ring)
+{
+       return (ring->head + info->nr - 1 - ring->tail) % info->nr;
+}
+
+struct kioctx {
+       atomic_t                users;
+       int                     dead;
+
+       /* This needs improving */
+       unsigned long           user_id;
+       struct hlist_node       list;
+
+       wait_queue_head_t       wait;
+
+       spinlock_t              ctx_lock;
+
+       int                     reqs_active;
+       struct list_head        active_reqs;    /* used for cancellation */
+
+       /* sys_io_setup currently limits this to an unsigned int */
+       unsigned                max_reqs;
+
+       struct aio_ring_info    ring_info;
+
+       struct rcu_head         rcu_head;
+};
+
 /*------ sysctl variables----*/
 static DEFINE_SPINLOCK(aio_nr_lock);
 unsigned long aio_nr;          /* current system wide number of aio requests */
index 615d55a5d0be882f2d3ced1a81fb68dd7063759c..7b1eb234e0ab13c99afb3bcc715bba5b1678e446 100644 (file)
@@ -103,67 +103,6 @@ static inline void init_sync_kiocb(struct kiocb *kiocb, struct file *filp)
                };
 }
 
-#define AIO_RING_MAGIC                 0xa10a10a1
-#define AIO_RING_COMPAT_FEATURES       1
-#define AIO_RING_INCOMPAT_FEATURES     0
-struct aio_ring {
-       unsigned        id;     /* kernel internal index number */
-       unsigned        nr;     /* number of io_events */
-       unsigned        head;
-       unsigned        tail;
-
-       unsigned        magic;
-       unsigned        compat_features;
-       unsigned        incompat_features;
-       unsigned        header_length;  /* size of aio_ring */
-
-
-       struct io_event         io_events[0];
-}; /* 128 bytes + ring size */
-
-#define AIO_RING_PAGES 8
-struct aio_ring_info {
-       unsigned long           mmap_base;
-       unsigned long           mmap_size;
-
-       struct page             **ring_pages;
-       spinlock_t              ring_lock;
-       long                    nr_pages;
-
-       unsigned                nr, tail;
-
-       struct page             *internal_pages[AIO_RING_PAGES];
-};
-
-static inline unsigned aio_ring_avail(struct aio_ring_info *info,
-                                       struct aio_ring *ring)
-{
-       return (ring->head + info->nr - 1 - ring->tail) % info->nr;
-}
-
-struct kioctx {
-       atomic_t                users;
-       int                     dead;
-
-       /* This needs improving */
-       unsigned long           user_id;
-       struct hlist_node       list;
-
-       wait_queue_head_t       wait;
-
-       spinlock_t              ctx_lock;
-
-       int                     reqs_active;
-       struct list_head        active_reqs;    /* used for cancellation */
-
-       /* sys_io_setup currently limits this to an unsigned int */
-       unsigned                max_reqs;
-
-       struct aio_ring_info    ring_info;
-
-       struct rcu_head         rcu_head;
-};
-
 /* prototypes */
 #ifdef CONFIG_AIO
 extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb);