Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 288399
b: refs/heads/master
c: 86b62a2
h: refs/heads/master
i:
  288397: 267ca73
  288395: ea73b43
  288391: f96cf8d
  288383: 40eebdc
v: v3
  • Loading branch information
Al Viro authored and Linus Torvalds committed Mar 10, 2012
1 parent dd46cf9 commit b604231
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 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: 86e06008338e5712603613a0f6770500f79e83bd
refs/heads/master: 86b62a2cb4fc09037bbce2959d2992962396fd7f
8 changes: 4 additions & 4 deletions trunk/fs/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ static struct kioctx *ioctx_alloc(unsigned nr_events)
mm = ctx->mm = current->mm;
atomic_inc(&mm->mm_count);

atomic_set(&ctx->users, 1);
atomic_set(&ctx->users, 2);
spin_lock_init(&ctx->ctx_lock);
spin_lock_init(&ctx->ring_info.ring_lock);
init_waitqueue_head(&ctx->wait);
Expand Down Expand Up @@ -1338,10 +1338,10 @@ SYSCALL_DEFINE2(io_setup, unsigned, nr_events, aio_context_t __user *, ctxp)
ret = PTR_ERR(ioctx);
if (!IS_ERR(ioctx)) {
ret = put_user(ioctx->user_id, ctxp);
if (!ret)
if (!ret) {
put_ioctx(ioctx);
return 0;

get_ioctx(ioctx); /* io_destroy() expects us to hold a ref */
}
io_destroy(ioctx);
}

Expand Down

0 comments on commit b604231

Please sign in to comment.