]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/aio.h
vfs: splice remove_suid() cleanup
[linux-2.6-omap-h63xx.git] / include / linux / aio.h
index 9e350fd44d7787d061393d7512e65513d4cf960f..b51ddd28444e38763e7066ed36ffa9a3a2b6b355 100644 (file)
@@ -86,7 +86,7 @@ struct kioctx;
  */
 struct kiocb {
        struct list_head        ki_run_list;
-       long                    ki_flags;
+       unsigned long           ki_flags;
        int                     ki_users;
        unsigned                ki_key;         /* id of this request */
 
@@ -111,7 +111,6 @@ struct kiocb {
        size_t                  ki_nbytes;      /* copy of iocb->aio_nbytes */
        char                    __user *ki_buf; /* remaining iocb->aio_buf */
        size_t                  ki_left;        /* remaining bytes */
-       long                    ki_retried;     /* just for testing */
        struct iovec            ki_inline_vec;  /* inline vector */
        struct iovec            *ki_iovec;
        unsigned long           ki_nr_segs;
@@ -119,6 +118,12 @@ struct kiocb {
 
        struct list_head        ki_list;        /* the aio core uses this
                                                 * for cancellation */
+
+       /*
+        * If the aio_resfd field of the userspace iocb is not zero,
+        * this is the underlying file* to deliver event to.
+        */
+       struct file             *ki_eventfd;
 };
 
 #define is_sync_kiocb(iocb)    ((iocb)->ki_key == KIOCB_SYNC_KEY)
@@ -200,45 +205,14 @@ struct kioctx {
 /* prototypes */
 extern unsigned aio_max_size;
 
-extern ssize_t FASTCALL(wait_on_sync_kiocb(struct kiocb *iocb));
-extern int FASTCALL(aio_put_req(struct kiocb *iocb));
-extern void FASTCALL(kick_iocb(struct kiocb *iocb));
-extern int FASTCALL(aio_complete(struct kiocb *iocb, long res, long res2));
-extern void FASTCALL(__put_ioctx(struct kioctx *ctx));
+extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb);
+extern int aio_put_req(struct kiocb *iocb);
+extern void kick_iocb(struct kiocb *iocb);
+extern int aio_complete(struct kiocb *iocb, long res, long res2);
 struct mm_struct;
-extern void FASTCALL(exit_aio(struct mm_struct *mm));
-extern struct kioctx *lookup_ioctx(unsigned long ctx_id);
-extern int FASTCALL(io_submit_one(struct kioctx *ctx,
-                       struct iocb __user *user_iocb, struct iocb *iocb));
-
-/* semi private, but used by the 32bit emulations: */
-struct kioctx *lookup_ioctx(unsigned long ctx_id);
-int FASTCALL(io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb,
-                                 struct iocb *iocb));
-
-#define get_ioctx(kioctx) do {                                         \
-       BUG_ON(atomic_read(&(kioctx)->users) <= 0);                     \
-       atomic_inc(&(kioctx)->users);                                   \
-} while (0)
-#define put_ioctx(kioctx) do {                                         \
-       BUG_ON(atomic_read(&(kioctx)->users) <= 0);                     \
-       if (unlikely(atomic_dec_and_test(&(kioctx)->users)))            \
-               __put_ioctx(kioctx);                                    \
-} while (0)
-
-#define in_aio() !is_sync_wait(current->io_wait)
-/* may be used for debugging */
-#define warn_if_async()                                                        \
-do {                                                                   \
-       if (in_aio()) {                                                 \
-               printk(KERN_ERR "%s(%s:%d) called in async context!\n", \
-                       __FUNCTION__, __FILE__, __LINE__);              \
-               dump_stack();                                           \
-       }                                                               \
-} while (0)
+extern void exit_aio(struct mm_struct *mm);
 
 #define io_wait_to_kiocb(wait) container_of(wait, struct kiocb, ki_wait)
-#define is_retried_kiocb(iocb) ((iocb)->ki_retried > 1)
 
 #include <linux/aio_abi.h>