netfilter: assign PDE->data before gluing PDE into /proc tree
Simply replace proc_create and further data assigned with proc_create_data. Signed-off-by: Denis V. Lunev <den@openvz.org> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
e7fe23363b
commit
6e79d85d9a
@@ -169,14 +169,14 @@ clusterip_config_init(const struct ipt_clusterip_tgt_info *i, __be32 ip,
|
||||
|
||||
/* create proc dir entry */
|
||||
sprintf(buffer, "%u.%u.%u.%u", NIPQUAD(ip));
|
||||
c->pde = proc_create(buffer, S_IWUSR|S_IRUSR,
|
||||
clusterip_procdir, &clusterip_proc_fops);
|
||||
c->pde = proc_create_data(buffer, S_IWUSR|S_IRUSR,
|
||||
clusterip_procdir,
|
||||
&clusterip_proc_fops, c);
|
||||
if (!c->pde) {
|
||||
kfree(c);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
c->pde->data = c;
|
||||
#endif
|
||||
|
||||
write_lock_bh(&clusterip_lock);
|
||||
|
||||
Reference in New Issue
Block a user