Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93973
b: refs/heads/master
c: e92adcb
h: refs/heads/master
i:
  93971: 1d6c1f0
v: v3
  • Loading branch information
Jeff Moyer authored and Linus Torvalds committed Apr 28, 2008
1 parent a4a172c commit 30578d5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 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: 180c06efce691f2b721dd0d965079827bdd7ee03
refs/heads/master: e92adcba261fd391591bb63c1703185a04a41554
12 changes: 11 additions & 1 deletion trunk/fs/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,10 @@ static int read_events(struct kioctx *ctx,
break;
if (min_nr <= i)
break;
ret = 0;
if (unlikely(ctx->dead)) {
ret = -EINVAL;
break;
}
if (to.timed_out) /* Only check after read evt */
break;
/* Try to only show up in io wait if there are ops
Expand Down Expand Up @@ -1231,6 +1234,13 @@ static void io_destroy(struct kioctx *ioctx)

aio_cancel_all(ioctx);
wait_for_all_aios(ioctx);

/*
* Wake up any waiters. The setting of ctx->dead must be seen
* by other CPUs at this point. Right now, we rely on the
* locking done by the above calls to ensure this consistency.
*/
wake_up(&ioctx->wait);
put_ioctx(ioctx); /* once for the lookup */
}

Expand Down

0 comments on commit 30578d5

Please sign in to comment.