--- vsock-only/linux/af_vsock.c.original 2010-10-22 10:33:51.482559002 +0200 +++ vsock-only/linux/af_vsock.c 2010-10-22 10:39:19.941559002 +0200 @@ -3230,7 +3230,7 @@ * a notification of an error. */ timeout = sock_sndtimeo(sk, flags & O_NONBLOCK); - compat_init_prepare_to_wait(sk->compat_sk_sleep, &wait, TASK_INTERRUPTIBLE); + compat_init_prepare_to_wait(compat_sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); while (sk->compat_sk_state != SS_CONNECTED && sk->compat_sk_err == 0) { if (timeout == 0) { @@ -3253,7 +3253,7 @@ goto outWaitError; } - compat_cont_prepare_to_wait(sk->compat_sk_sleep, &wait, TASK_INTERRUPTIBLE); + compat_cont_prepare_to_wait(compat_sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); } if (sk->compat_sk_err) { @@ -3265,7 +3265,7 @@ } outWait: - compat_finish_wait(sk->compat_sk_sleep, &wait, TASK_RUNNING); + compat_finish_wait(compat_sk_sleep(sk), &wait, TASK_RUNNING); out: release_sock(sk); return err; @@ -3325,7 +3325,7 @@ * upon connection establishment. */ timeout = sock_sndtimeo(listener, flags & O_NONBLOCK); - compat_init_prepare_to_wait(listener->compat_sk_sleep, &wait, TASK_INTERRUPTIBLE); + compat_init_prepare_to_wait(compat_sk_sleep(listener), &wait, TASK_INTERRUPTIBLE); while ((connected = VSockVmciDequeueAccept(listener)) == NULL && listener->compat_sk_err == 0) { @@ -3341,7 +3341,7 @@ goto outWait; } - compat_cont_prepare_to_wait(listener->compat_sk_sleep, &wait, TASK_INTERRUPTIBLE); + compat_cont_prepare_to_wait(compat_sk_sleep(listener), &wait, TASK_INTERRUPTIBLE); } if (listener->compat_sk_err) { @@ -3375,7 +3375,7 @@ } outWait: - compat_finish_wait(listener->compat_sk_sleep, &wait, TASK_RUNNING); + compat_finish_wait(compat_sk_sleep(listener), &wait, TASK_RUNNING); out: release_sock(listener); return err; @@ -3473,7 +3473,7 @@ sk = sock->sk; vsk = vsock_sk(sk); - poll_wait(file, sk->compat_sk_sleep, wait); + poll_wait(file, compat_sk_sleep(sk), wait); mask = 0; if (sk->compat_sk_err) { @@ -4113,7 +4113,7 @@ goto out; } - compat_init_prepare_to_wait(sk->compat_sk_sleep, &wait, TASK_INTERRUPTIBLE); + compat_init_prepare_to_wait(compat_sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); while (totalWritten < len) { Bool sentWrote; @@ -4150,7 +4150,7 @@ goto outWait; } - compat_cont_prepare_to_wait(sk->compat_sk_sleep, + compat_cont_prepare_to_wait(compat_sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); } @@ -4203,7 +4203,7 @@ if (totalWritten > 0) { err = totalWritten; } - compat_finish_wait(sk->compat_sk_sleep, &wait, TASK_RUNNING); + compat_finish_wait(compat_sk_sleep(sk), &wait, TASK_RUNNING); out: release_sock(sk); return err; @@ -4437,7 +4437,7 @@ goto out; } - compat_init_prepare_to_wait(sk->compat_sk_sleep, &wait, TASK_INTERRUPTIBLE); + compat_init_prepare_to_wait(compat_sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); while ((ready = VSockVmciStreamHasData(vsk)) < target && sk->compat_sk_err == 0 && @@ -4477,7 +4477,7 @@ goto outWait; } - compat_cont_prepare_to_wait(sk->compat_sk_sleep, &wait, TASK_INTERRUPTIBLE); + compat_cont_prepare_to_wait(compat_sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); } if (sk->compat_sk_err) { @@ -4543,7 +4543,7 @@ err = copied; outWait: - compat_finish_wait(sk->compat_sk_sleep, &wait, TASK_RUNNING); + compat_finish_wait(compat_sk_sleep(sk), &wait, TASK_RUNNING); out: release_sock(sk); return err;