]> xenbits.xensource.com Git - xenclient/kernel.git/commitdiff
Avoid potential deadlock which wedges dom0. fix-cfq-iscsi-live-lock.patch
authort_jeang <devnull@localhost>
Tue, 6 Jan 2009 12:06:00 +0000 (12:06 +0000)
committert_jeang <devnull@localhost>
Tue, 6 Jan 2009 12:06:00 +0000 (12:06 +0000)
fs/aio.c

index 4c1915a1e84e1b664425763dcf75bc680646984d..7f1696af920e81d4f36131d61dbb2bab33875942 100644 (file)
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1285,10 +1285,10 @@ static unsigned int aio_queue_fd_poll(struct file *file, poll_table *wait)
 
        if (ioctx) {
 
-               spin_lock_irq(&ioctx->ctx_lock);
                /* Insert inside our poll wait queue */
                poll_wait(file, &ioctx->poll_wait, wait);
 
+               spin_lock_irq(&ioctx->ctx_lock);
                /* Check our condition */
                if (aio_read_evt(ioctx, 0))
                        pollflags = POLLIN | POLLRDNORM;