Skip to content

Commit

Permalink
aio: aio_nr_lock is taken only synchronously now
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Mar 21, 2012
1 parent 2dd542b commit 9fa1cb3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,14 @@ static struct kioctx *ioctx_alloc(unsigned nr_events)
goto out_freectx;

/* limit the number of system wide aios */
spin_lock_bh(&aio_nr_lock);
spin_lock(&aio_nr_lock);
if (aio_nr + nr_events > aio_max_nr ||
aio_nr + nr_events < aio_nr) {
spin_unlock_bh(&aio_nr_lock);
spin_unlock(&aio_nr_lock);
goto out_cleanup;
}
aio_nr += ctx->max_reqs;
spin_unlock_bh(&aio_nr_lock);
spin_unlock(&aio_nr_lock);

/* now link into global list. */
spin_lock(&mm->ioctx_lock);
Expand Down

0 comments on commit 9fa1cb3

Please sign in to comment.