Commit d9c495bf authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] aio compat patches

The new aio emulation in x86-64 needs a few aio symbols exported.
Export them.
parent a1652ab3
...@@ -522,7 +522,7 @@ int aio_put_req(struct kiocb *req) ...@@ -522,7 +522,7 @@ int aio_put_req(struct kiocb *req)
/* Lookup an ioctx id. ioctx_list is lockless for reads. /* Lookup an ioctx id. ioctx_list is lockless for reads.
* FIXME: this is O(n) and is only suitable for development. * FIXME: this is O(n) and is only suitable for development.
*/ */
static struct kioctx *lookup_ioctx(unsigned long ctx_id) struct kioctx *lookup_ioctx(unsigned long ctx_id)
{ {
struct kioctx *ioctx; struct kioctx *ioctx;
struct mm_struct *mm; struct mm_struct *mm;
...@@ -984,9 +984,9 @@ asmlinkage long sys_io_destroy(aio_context_t ctx) ...@@ -984,9 +984,9 @@ asmlinkage long sys_io_destroy(aio_context_t ctx)
return -EINVAL; return -EINVAL;
} }
static int FASTCALL(io_submit_one(struct kioctx *ctx, struct iocb *user_iocb, int FASTCALL(io_submit_one(struct kioctx *ctx, struct iocb *user_iocb,
struct iocb *iocb)); struct iocb *iocb));
static int io_submit_one(struct kioctx *ctx, struct iocb *user_iocb, int io_submit_one(struct kioctx *ctx, struct iocb *user_iocb,
struct iocb *iocb) struct iocb *iocb)
{ {
struct kiocb *req; struct kiocb *req;
......
...@@ -148,6 +148,11 @@ extern void FASTCALL(__put_ioctx(struct kioctx *ctx)); ...@@ -148,6 +148,11 @@ extern void FASTCALL(__put_ioctx(struct kioctx *ctx));
struct mm_struct; struct mm_struct;
extern void FASTCALL(exit_aio(struct mm_struct *mm)); extern void FASTCALL(exit_aio(struct mm_struct *mm));
/* 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_iocb,
struct iocb *iocb));
#define get_ioctx(kioctx) do { if (unlikely(atomic_read(&(kioctx)->users) <= 0)) BUG(); atomic_inc(&(kioctx)->users); } while (0) #define get_ioctx(kioctx) do { if (unlikely(atomic_read(&(kioctx)->users) <= 0)) BUG(); atomic_inc(&(kioctx)->users); } while (0)
#define put_ioctx(kioctx) do { if (unlikely(atomic_dec_and_test(&(kioctx)->users))) __put_ioctx(kioctx); else if (unlikely(atomic_read(&(kioctx)->users) < 0)) BUG(); } while (0) #define put_ioctx(kioctx) do { if (unlikely(atomic_dec_and_test(&(kioctx)->users))) __put_ioctx(kioctx); else if (unlikely(atomic_read(&(kioctx)->users) < 0)) BUG(); } while (0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment