diff options
| author | Takashi Iwai <tiwai@suse.de> | 2015-07-24 20:08:13 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2015-07-24 20:08:13 +0200 |
| commit | 43cbf02e7ad51007af38f39c5b2abdc7a5d7f5aa (patch) | |
| tree | 1057babea8807af3f4a3c44fd116b7bbe99eb733 /net/core/stream.c | |
| parent | cba59972a1191a0c1647a52fe745eed7a4b34b38 (diff) | |
| parent | 996034b117b467709dec7811ef134063934fa626 (diff) | |
Merge tag 'asoc-fix-v4.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v4.2
A lot of small fixes here, a few to the core:
- Fix for binding DAPM stream widgets on devices with prefixes assigned
to them
- Minor fixes for the newly added topology interfaces
- Locking and memory leak fixes for DAPM
- Driver specific fixes
Diffstat (limited to 'net/core/stream.c')
| -rw-r--r-- | net/core/stream.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/core/stream.c b/net/core/stream.c index 301c05f26060..d70f77a0c889 100644 --- a/net/core/stream.c +++ b/net/core/stream.c @@ -119,6 +119,7 @@ int sk_stream_wait_memory(struct sock *sk, long *timeo_p) int err = 0; long vm_wait = 0; long current_timeo = *timeo_p; + bool noblock = (*timeo_p ? false : true); DEFINE_WAIT(wait); if (sk_stream_memory_free(sk)) @@ -131,8 +132,11 @@ int sk_stream_wait_memory(struct sock *sk, long *timeo_p) if (sk->sk_err || (sk->sk_shutdown & SEND_SHUTDOWN)) goto do_error; - if (!*timeo_p) + if (!*timeo_p) { + if (noblock) + set_bit(SOCK_NOSPACE, &sk->sk_socket->flags); goto do_nonblock; + } if (signal_pending(current)) goto do_interrupted; clear_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags); |
