aio: aio_nr_lock is taken only synchronously now
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 11 Mar 2012 04:14:05 +0000 (23:14 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 21 Mar 2012 01:29:39 +0000 (21:29 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/aio.c

index 216eb37..9c3de88 100644 (file)
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -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);