]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/netfilter/x_tables.c
procfs: new helper - PDE_DATA(inode)
[mirror_ubuntu-bionic-kernel.git] / net / netfilter / x_tables.c
index 7b3a9e5999c0664cebe524fefba7130a6df003ce..67fb7bff9bbc7041d383394610f4d9fc6a6303ca 100644 (file)
@@ -999,7 +999,7 @@ static int xt_table_open(struct inode *inode, struct file *file)
                           sizeof(struct xt_names_priv));
        if (!ret) {
                priv = ((struct seq_file *)file->private_data)->private;
-               priv->af = (unsigned long)PDE(inode)->data;
+               priv->af = (unsigned long)PDE_DATA(inode);
        }
        return ret;
 }
@@ -1147,7 +1147,7 @@ static int xt_match_open(struct inode *inode, struct file *file)
 
        seq = file->private_data;
        seq->private = trav;
-       trav->nfproto = (unsigned long)PDE(inode)->data;
+       trav->nfproto = (unsigned long)PDE_DATA(inode);
        return 0;
 }
 
@@ -1211,7 +1211,7 @@ static int xt_target_open(struct inode *inode, struct file *file)
 
        seq = file->private_data;
        seq->private = trav;
-       trav->nfproto = (unsigned long)PDE(inode)->data;
+       trav->nfproto = (unsigned long)PDE_DATA(inode);
        return 0;
 }
 
@@ -1323,12 +1323,12 @@ int xt_proto_init(struct net *net, u_int8_t af)
 out_remove_matches:
        strlcpy(buf, xt_prefix[af], sizeof(buf));
        strlcat(buf, FORMAT_MATCHES, sizeof(buf));
-       proc_net_remove(net, buf);
+       remove_proc_entry(buf, net->proc_net);
 
 out_remove_tables:
        strlcpy(buf, xt_prefix[af], sizeof(buf));
        strlcat(buf, FORMAT_TABLES, sizeof(buf));
-       proc_net_remove(net, buf);
+       remove_proc_entry(buf, net->proc_net);
 out:
        return -1;
 #endif
@@ -1342,15 +1342,15 @@ void xt_proto_fini(struct net *net, u_int8_t af)
 
        strlcpy(buf, xt_prefix[af], sizeof(buf));
        strlcat(buf, FORMAT_TABLES, sizeof(buf));
-       proc_net_remove(net, buf);
+       remove_proc_entry(buf, net->proc_net);
 
        strlcpy(buf, xt_prefix[af], sizeof(buf));
        strlcat(buf, FORMAT_TARGETS, sizeof(buf));
-       proc_net_remove(net, buf);
+       remove_proc_entry(buf, net->proc_net);
 
        strlcpy(buf, xt_prefix[af], sizeof(buf));
        strlcat(buf, FORMAT_MATCHES, sizeof(buf));
-       proc_net_remove(net, buf);
+       remove_proc_entry(buf, net->proc_net);
 #endif /*CONFIG_PROC_FS*/
 }
 EXPORT_SYMBOL_GPL(xt_proto_fini);