diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/core/sock.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index 8b35ccdc2b3b..12f6d9a2a522 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -206,13 +206,14 @@ int sock_setsockopt(struct socket *sock, int level, int optname, | |||
206 | */ | 206 | */ |
207 | 207 | ||
208 | #ifdef SO_DONTLINGER /* Compatibility item... */ | 208 | #ifdef SO_DONTLINGER /* Compatibility item... */ |
209 | switch (optname) { | 209 | if (optname == SO_DONTLINGER) { |
210 | case SO_DONTLINGER: | 210 | lock_sock(sk); |
211 | sock_reset_flag(sk, SOCK_LINGER); | 211 | sock_reset_flag(sk, SOCK_LINGER); |
212 | return 0; | 212 | release_sock(sk); |
213 | return 0; | ||
213 | } | 214 | } |
214 | #endif | 215 | #endif |
215 | 216 | ||
216 | if(optlen<sizeof(int)) | 217 | if(optlen<sizeof(int)) |
217 | return(-EINVAL); | 218 | return(-EINVAL); |
218 | 219 | ||