]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - net/netlink/af_netlink.c
net: proc: change proc_net_fops_create to proc_create
[mirror_ubuntu-artful-kernel.git] / net / netlink / af_netlink.c
index c0353d55d56fc4221d72153c6f54849cb89f292b..50084c40a129c97ed3289a89c620ee51cdf5f5a6 100644 (file)
@@ -2145,7 +2145,7 @@ static const struct net_proto_family netlink_family_ops = {
 static int __net_init netlink_net_init(struct net *net)
 {
 #ifdef CONFIG_PROC_FS
-       if (!proc_net_fops_create(net, "netlink", 0, &netlink_seq_fops))
+       if (!proc_create("netlink", 0, net->proc_net, &netlink_seq_fops))
                return -ENOMEM;
 #endif
        return 0;
@@ -2185,7 +2185,6 @@ static struct pernet_operations __net_initdata netlink_net_ops = {
 
 static int __init netlink_proto_init(void)
 {
-       struct sk_buff *dummy_skb;
        int i;
        unsigned long limit;
        unsigned int order;
@@ -2194,7 +2193,7 @@ static int __init netlink_proto_init(void)
        if (err != 0)
                goto out;
 
-       BUILD_BUG_ON(sizeof(struct netlink_skb_parms) > sizeof(dummy_skb->cb));
+       BUILD_BUG_ON(sizeof(struct netlink_skb_parms) > FIELD_SIZEOF(struct sk_buff, cb));
 
        nl_table = kcalloc(MAX_LINKS, sizeof(*nl_table), GFP_KERNEL);
        if (!nl_table)