diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-03-10 23:14:05 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-03-20 21:29:39 -0400 |
commit | 9fa1cb397fa052fc9acfaf5a9f2faff31e10f6b7 (patch) | |
tree | 4dfb32cac8ef67c312dec2e0232816913c6cc447 /fs/aio.c | |
parent | 2dd542b7aeb1c222273cf0593a718d9b44998d9f (diff) |
aio: aio_nr_lock is taken only synchronously now
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/aio.c')
-rw-r--r-- | fs/aio.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -278,14 +278,14 @@ static struct kioctx *ioctx_alloc(unsigned nr_events) | |||
278 | goto out_freectx; | 278 | goto out_freectx; |
279 | 279 | ||
280 | /* limit the number of system wide aios */ | 280 | /* limit the number of system wide aios */ |
281 | spin_lock_bh(&aio_nr_lock); | 281 | spin_lock(&aio_nr_lock); |
282 | if (aio_nr + nr_events > aio_max_nr || | 282 | if (aio_nr + nr_events > aio_max_nr || |
283 | aio_nr + nr_events < aio_nr) { | 283 | aio_nr + nr_events < aio_nr) { |
284 | spin_unlock_bh(&aio_nr_lock); | 284 | spin_unlock(&aio_nr_lock); |
285 | goto out_cleanup; | 285 | goto out_cleanup; |
286 | } | 286 | } |
287 | aio_nr += ctx->max_reqs; | 287 | aio_nr += ctx->max_reqs; |
288 | spin_unlock_bh(&aio_nr_lock); | 288 | spin_unlock(&aio_nr_lock); |
289 | 289 | ||
290 | /* now link into global list. */ | 290 | /* now link into global list. */ |
291 | spin_lock(&mm->ioctx_lock); | 291 | spin_lock(&mm->ioctx_lock); |