Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 132498
b: refs/heads/master
c: 65c2449
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Moyer authored and Linus Torvalds committed Mar 19, 2009
1 parent 39c0049 commit 2264594
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 87c3a86e1c220121d0ced59d1a71e78ed9abc6dd
refs/heads/master: 65c24491b4fef017c64e39ec64384fde5e05e0a0
5 changes: 3 additions & 2 deletions trunk/fs/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,20 +587,21 @@ int aio_put_req(struct kiocb *req)
static struct kioctx *lookup_ioctx(unsigned long ctx_id)
{
struct mm_struct *mm = current->mm;
struct kioctx *ctx = NULL;
struct kioctx *ctx, *ret = NULL;
struct hlist_node *n;

rcu_read_lock();

hlist_for_each_entry_rcu(ctx, n, &mm->ioctx_list, list) {
if (ctx->user_id == ctx_id && !ctx->dead) {
get_ioctx(ctx);
ret = ctx;
break;
}
}

rcu_read_unlock();
return ctx;
return ret;
}

/*
Expand Down

0 comments on commit 2264594

Please sign in to comment.