Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40476
b: refs/heads/master
c: d6740df
h: refs/heads/master
v: v3
  • Loading branch information
Neil Brown authored and Linus Torvalds committed Oct 30, 2006
1 parent 67ae2be commit ac078f3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 20 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: 2b52c9590d5ad2fb67b720ec12018dd2cf061480
refs/heads/master: d6740df98e12a8e49ef3a699dcc1e2913f22c51b
4 changes: 1 addition & 3 deletions trunk/net/sunrpc/svcauth.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,8 @@ auth_domain_lookup(char *name, struct auth_domain *new)
return hp;
}
}
if (new) {
if (new)
hlist_add_head(&new->hash, head);
kref_get(&new->ref);
}
spin_unlock(&auth_domain_lock);
return new;
}
Expand Down
30 changes: 14 additions & 16 deletions trunk/net/sunrpc/svcsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,13 @@ static inline void
svc_sock_put(struct svc_sock *svsk)
{
if (atomic_dec_and_test(&svsk->sk_inuse) && test_bit(SK_DEAD, &svsk->sk_flags)) {
dprintk("svc: releasing dead socket\n");
sock_release(svsk->sk_sock);
printk("svc: releasing dead socket\n");
if (svsk->sk_sock->file)
sockfd_put(svsk->sk_sock);
else
sock_release(svsk->sk_sock);
if (svsk->sk_info_authunix != NULL)
svcauth_unix_info_release(svsk->sk_info_authunix);
kfree(svsk);
}
}
Expand Down Expand Up @@ -1604,20 +1609,13 @@ svc_delete_socket(struct svc_sock *svsk)
if (test_bit(SK_TEMP, &svsk->sk_flags))
serv->sv_tmpcnt--;

if (!atomic_read(&svsk->sk_inuse)) {
spin_unlock_bh(&serv->sv_lock);
if (svsk->sk_sock->file)
sockfd_put(svsk->sk_sock);
else
sock_release(svsk->sk_sock);
if (svsk->sk_info_authunix != NULL)
svcauth_unix_info_release(svsk->sk_info_authunix);
kfree(svsk);
} else {
spin_unlock_bh(&serv->sv_lock);
dprintk(KERN_NOTICE "svc: server socket destroy delayed\n");
/* svsk->sk_server = NULL; */
}
/* This atomic_inc should be needed - svc_delete_socket
* should have the semantic of dropping a reference.
* But it doesn't yet....
*/
atomic_inc(&svsk->sk_inuse);
spin_unlock_bh(&serv->sv_lock);
svc_sock_put(svsk);
}

/*
Expand Down

0 comments on commit ac078f3

Please sign in to comment.