diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/tipc/socket.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 9ae8e9f74028..3220d5cb5b5d 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c | |||
@@ -1419,7 +1419,7 @@ exit: | |||
1419 | /** | 1419 | /** |
1420 | * shutdown - shutdown socket connection | 1420 | * shutdown - shutdown socket connection |
1421 | * @sock: socket structure | 1421 | * @sock: socket structure |
1422 | * @how: direction to close (unused; always treated as read + write) | 1422 | * @how: direction to close (must be SHUT_RDWR) |
1423 | * | 1423 | * |
1424 | * Terminates connection (if necessary), then purges socket's receive queue. | 1424 | * Terminates connection (if necessary), then purges socket's receive queue. |
1425 | * | 1425 | * |
@@ -1432,7 +1432,8 @@ static int shutdown(struct socket *sock, int how) | |||
1432 | struct sk_buff *buf; | 1432 | struct sk_buff *buf; |
1433 | int res; | 1433 | int res; |
1434 | 1434 | ||
1435 | /* Could return -EINVAL for an invalid "how", but why bother? */ | 1435 | if (how != SHUT_RDWR) |
1436 | return -EINVAL; | ||
1436 | 1437 | ||
1437 | if (mutex_lock_interruptible(&tsock->lock)) | 1438 | if (mutex_lock_interruptible(&tsock->lock)) |
1438 | return -ERESTARTSYS; | 1439 | return -ERESTARTSYS; |