aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/aio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/aio.c b/fs/aio.c
index 4a9d4d641fb..76da1253795 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -587,7 +587,7 @@ int aio_put_req(struct kiocb *req)
587static struct kioctx *lookup_ioctx(unsigned long ctx_id) 587static struct kioctx *lookup_ioctx(unsigned long ctx_id)
588{ 588{
589 struct mm_struct *mm = current->mm; 589 struct mm_struct *mm = current->mm;
590 struct kioctx *ctx = NULL; 590 struct kioctx *ctx, *ret = NULL;
591 struct hlist_node *n; 591 struct hlist_node *n;
592 592
593 rcu_read_lock(); 593 rcu_read_lock();
@@ -595,12 +595,13 @@ static struct kioctx *lookup_ioctx(unsigned long ctx_id)
595 hlist_for_each_entry_rcu(ctx, n, &mm->ioctx_list, list) { 595 hlist_for_each_entry_rcu(ctx, n, &mm->ioctx_list, list) {
596 if (ctx->user_id == ctx_id && !ctx->dead) { 596 if (ctx->user_id == ctx_id && !ctx->dead) {
597 get_ioctx(ctx); 597 get_ioctx(ctx);
598 ret = ctx;
598 break; 599 break;
599 } 600 }
600 } 601 }
601 602
602 rcu_read_unlock(); 603 rcu_read_unlock();
603 return ctx; 604 return ret;
604} 605}
605 606
606/* 607/*