o af_key: remove MOD_{INC,DEC}_USE_COUNT

Now the core networking infrastructure will (finally) do that for the net
protocol families, its just a matter of setting the ->owner field in the
registered struct net_proto_family to THIS_MODULE.
parent 8817c55e
......@@ -1434,7 +1434,7 @@ static void net_tx_action(struct softirq_action *h)
}
#if defined(CONFIG_BRIDGE) || defined (CONFIG_BRIDGE_MODULE)
int (*br_handle_frame_hook)(struct sk_buff *skb) = NULL;
int (*br_handle_frame_hook)(struct sk_buff *skb);
static __inline__ int handle_bridge(struct sk_buff *skb,
struct packet_type *pt_prev)
......
......@@ -63,8 +63,6 @@ static void pfkey_sock_destruct(struct sock *sk)
kfree(pfkey_sk(sk));
atomic_dec(&pfkey_socks_nr);
MOD_DEC_USE_COUNT;
}
static void pfkey_table_grab(void)
......@@ -150,8 +148,6 @@ static int pfkey_create(struct socket *sock, int protocol)
if (protocol != PF_KEY_V2)
return -EPROTONOSUPPORT;
MOD_INC_USE_COUNT;
err = -ENOMEM;
sk = sk_alloc(PF_KEY, GFP_KERNEL, 1, NULL);
if (sk == NULL)
......@@ -176,9 +172,7 @@ static int pfkey_create(struct socket *sock, int protocol)
pfkey_insert(sk);
return 0;
out:
MOD_DEC_USE_COUNT;
return err;
}
......@@ -2792,6 +2786,7 @@ static struct proto_ops pfkey_ops = {
static struct net_proto_family pfkey_family_ops = {
.family = PF_KEY,
.create = pfkey_create,
.owner = THIS_MODULE,
};
#ifdef CONFIG_PROC_FS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment