diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-07-18 04:07:21 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-18 04:07:21 -0700 |
commit | de05c557b24c7dffc6d392e3db120cf11c9f6ae7 (patch) | |
tree | d1d6fe1323657afd7d416c6af8a62d6a9e1e1e66 /net/ipv4/fib_trie.c | |
parent | 60bdde95807e982a824be9cfdd35055cc721a88a (diff) | |
download | linux-3.10-de05c557b24c7dffc6d392e3db120cf11c9f6ae7.tar.gz linux-3.10-de05c557b24c7dffc6d392e3db120cf11c9f6ae7.tar.bz2 linux-3.10-de05c557b24c7dffc6d392e3db120cf11c9f6ae7.zip |
proc: consolidate per-net single_open callers
There are already 7 of them - time to kill some duplicate code.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_trie.c')
-rw-r--r-- | net/ipv4/fib_trie.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index f155a66d6eb..6009df238ed 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c @@ -2251,18 +2251,7 @@ static int fib_triestat_seq_show(struct seq_file *seq, void *v) static int fib_triestat_seq_open(struct inode *inode, struct file *file) { - int err; - struct net *net; - - net = get_proc_net(inode); - if (net == NULL) - return -ENXIO; - err = single_open(file, fib_triestat_seq_show, net); - if (err < 0) { - put_net(net); - return err; - } - return 0; + return single_open_net(inode, file, fib_triestat_seq_show); } static int fib_triestat_seq_release(struct inode *ino, struct file *f) |