Phonet: fix /proc/net/phonet with network namespaces
authorRémi Denis-Courmont <remi.denis-courmont@nokia.com>
Tue, 11 Aug 2009 03:12:07 +0000 (03:12 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Aug 2009 05:13:19 +0000 (22:13 -0700)
seq_open_net() and seq_release() are needed for seq_file_net().

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/phonet/socket.c

index aa1617a7f265ceef49af3971fbd414724cff71c7..5f26c3711a1e1a06cab2363aa1a1cd5295f3a56e 100644 (file)
@@ -498,7 +498,8 @@ static const struct seq_operations pn_sock_seq_ops = {
 
 static int pn_sock_open(struct inode *inode, struct file *file)
 {
-       return seq_open(file, &pn_sock_seq_ops);
+       return seq_open_net(inode, file, &pn_sock_seq_ops,
+                               sizeof(struct seq_net_private));
 }
 
 const struct file_operations pn_sock_seq_fops = {
@@ -506,5 +507,5 @@ const struct file_operations pn_sock_seq_fops = {
        .open = pn_sock_open,
        .read = seq_read,
        .llseek = seq_lseek,
-       .release = seq_release,
+       .release = seq_release_net,
 };