Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298360
b: refs/heads/master
c: a2e1859
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Mar 31, 2012
1 parent 713046a commit e93ee6f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 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: 06af121eab543e5554f7a29538f171a382aaf855
refs/heads/master: a2e1859adb3b05fa99f87a67df9ef2a4b7b04a13
10 changes: 4 additions & 6 deletions trunk/fs/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1270,7 +1270,6 @@ static void io_destroy(struct kioctx *ioctx)
* locking done by the above calls to ensure this consistency.
*/
wake_up_all(&ioctx->wait);
put_ioctx(ioctx); /* once for the lookup */
}

/* sys_io_setup:
Expand Down Expand Up @@ -1307,11 +1306,9 @@ 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) {
put_ioctx(ioctx);
return 0;
}
io_destroy(ioctx);
if (ret)
io_destroy(ioctx);
put_ioctx(ioctx);
}

out:
Expand All @@ -1329,6 +1326,7 @@ SYSCALL_DEFINE1(io_destroy, aio_context_t, ctx)
struct kioctx *ioctx = lookup_ioctx(ctx);
if (likely(NULL != ioctx)) {
io_destroy(ioctx);
put_ioctx(ioctx);
return 0;
}
pr_debug("EINVAL: io_destroy: invalid context id\n");
Expand Down

0 comments on commit e93ee6f

Please sign in to comment.