[NETLINK]: Make netlink_callback->done() optional

Most netlink families make no use of the done() callback, making
it optional gets rid of all unnecessary dummy implementations.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Thomas Graf 2005-11-10 02:25:52 +01:00 committed by Thomas Graf
parent bfa83a9e03
commit a8f74b2288
5 changed files with 8 additions and 25 deletions

View file

@ -427,7 +427,8 @@ static int netlink_release(struct socket *sock)
spin_lock(&nlk->cb_lock);
if (nlk->cb) {
nlk->cb->done(nlk->cb);
if (nlk->cb->done)
nlk->cb->done(nlk->cb);
netlink_destroy_callback(nlk->cb);
nlk->cb = NULL;
}
@ -1322,7 +1323,8 @@ static int netlink_dump(struct sock *sk)
skb_queue_tail(&sk->sk_receive_queue, skb);
sk->sk_data_ready(sk, skb->len);
cb->done(cb);
if (cb->done)
cb->done(cb);
nlk->cb = NULL;
spin_unlock(&nlk->cb_lock);