mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[NET] NETNS: Omit seq_net_private->net without CONFIG_NET_NS.
Without CONFIG_NET_NS, no namespace other than &init_net exists, no need to store net in seq_net_private. Signed-off-by: YOSHIFUJI Hideaki <[email protected]>
This commit is contained in:
parent
3b1e0a655f
commit
1218854afa
12 changed files with 53 additions and 47 deletions
|
|
@ -44,7 +44,9 @@ int seq_open_net(struct inode *ino, struct file *f,
|
|||
put_net(net);
|
||||
return -ENOMEM;
|
||||
}
|
||||
#ifdef CONFIG_NET_NS
|
||||
p->net = net;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(seq_open_net);
|
||||
|
|
@ -52,12 +54,10 @@ EXPORT_SYMBOL_GPL(seq_open_net);
|
|||
int seq_release_net(struct inode *ino, struct file *f)
|
||||
{
|
||||
struct seq_file *seq;
|
||||
struct seq_net_private *p;
|
||||
|
||||
seq = f->private_data;
|
||||
p = seq->private;
|
||||
|
||||
put_net(p->net);
|
||||
put_net(seq_file_net(seq));
|
||||
seq_release_private(ino, f);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue