net: proc: change proc_net_fops_create to proc_create
[firefly-linux-kernel-4.4.55.git] / net / core / sock.c
index 235fb89e8973a864978c00acfa0dbc0173762082..b4d562ef36fb743434e1ea13f05e0531a70ca22e 100644 (file)
@@ -2230,7 +2230,7 @@ EXPORT_SYMBOL(sk_reset_timer);
 
 void sk_stop_timer(struct sock *sk, struct timer_list* timer)
 {
-       if (timer_pending(timer) && del_timer(timer))
+       if (del_timer(timer))
                __sock_put(sk);
 }
 EXPORT_SYMBOL(sk_stop_timer);
@@ -2836,7 +2836,7 @@ static const struct file_operations proto_seq_fops = {
 
 static __net_init int proto_init_net(struct net *net)
 {
-       if (!proc_net_fops_create(net, "protocols", S_IRUGO, &proto_seq_fops))
+       if (!proc_create("protocols", S_IRUGO, net->proc_net, &proto_seq_fops))
                return -ENOMEM;
 
        return 0;