--- vsock-only/linux/af_vsock.c.orig 2009-03-27 01:34:32.000000000 -0400 +++ vsock-only/linux/af_vsock.c 2010-08-04 14:12:13.000000000 -0400 @@ -3149,7 +3149,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) { @@ -3172,7 +3172,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) { @@ -3184,7 +3184,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; @@ -3391,7 +3391,7 @@ sk = sock->sk; - poll_wait(file, sk->compat_sk_sleep, wait); + poll_wait(file, compat_sk_sleep(sk), wait); mask = 0; if (sk->compat_sk_err) { @@ -3992,7 +3992,7 @@ * Wait for room in the produce queue to enqueue our user's data. */ timeout = sock_sndtimeo(sk, msg->msg_flags & MSG_DONTWAIT); - 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; @@ -4031,7 +4031,7 @@ goto outWait; } - compat_cont_prepare_to_wait(sk->compat_sk_sleep, + compat_cont_prepare_to_wait(compat_sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); } @@ -4114,7 +4114,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; @@ -4337,7 +4337,7 @@ timeout = sock_rcvtimeo(sk, flags & MSG_DONTWAIT); copied = 0; - 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 = VMCIQueue_BufReady(vsk->consumeQ, vsk->produceQ, @@ -4380,7 +4380,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) { @@ -4472,7 +4472,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;