Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88039
b: refs/heads/master
c: 4965291
h: refs/heads/master
i:
  88037: fba01b4
  88035: a206463
  88031: 4b8b5cc
v: v3
  • Loading branch information
Jarek Poplawski authored and David S. Miller committed Apr 2, 2008
1 parent ae78a11 commit a68fc52
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d43c7b37ad787173d08683f05eadeea0398fefdf
refs/heads/master: 4965291acf8cc2c31dcb2fc7d292a04ee08da2dd
9 changes: 9 additions & 0 deletions trunk/net/rose/af_rose.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,17 +598,24 @@ static int rose_release(struct socket *sock)

if (sk == NULL) return 0;

sock_hold(sk);
sock_orphan(sk);
lock_sock(sk);
rose = rose_sk(sk);

switch (rose->state) {
case ROSE_STATE_0:
release_sock(sk);
rose_disconnect(sk, 0, -1, -1);
lock_sock(sk);
rose_destroy_socket(sk);
break;

case ROSE_STATE_2:
rose->neighbour->use--;
release_sock(sk);
rose_disconnect(sk, 0, -1, -1);
lock_sock(sk);
rose_destroy_socket(sk);
break;

Expand All @@ -633,6 +640,8 @@ static int rose_release(struct socket *sock)
}

sock->sk = NULL;
release_sock(sk);
sock_put(sk);

return 0;
}
Expand Down

0 comments on commit a68fc52

Please sign in to comment.