Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327739
b: refs/heads/master
c: fc61b92
h: refs/heads/master
i:
  327737: 29d4e90
  327735: 4adf6f2
v: v3
  • Loading branch information
Xi Wang authored and David S. Miller committed Aug 31, 2012
1 parent c33147d commit 51c3389
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 46b66d7077b89fb4917ceef19b3f7dd86055c94a
refs/heads/master: fc61b928dc4d72176cf4bd4d30bf1d22e599aefc
12 changes: 8 additions & 4 deletions trunk/net/unix/af_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -2060,10 +2060,14 @@ static int unix_shutdown(struct socket *sock, int mode)
struct sock *sk = sock->sk;
struct sock *other;

mode = (mode+1)&(RCV_SHUTDOWN|SEND_SHUTDOWN);

if (!mode)
return 0;
if (mode < SHUT_RD || mode > SHUT_RDWR)
return -EINVAL;
/* This maps:
* SHUT_RD (0) -> RCV_SHUTDOWN (1)
* SHUT_WR (1) -> SEND_SHUTDOWN (2)
* SHUT_RDWR (2) -> SHUTDOWN_MASK (3)
*/
++mode;

unix_state_lock(sk);
sk->sk_shutdown |= mode;
Expand Down

0 comments on commit 51c3389

Please sign in to comment.