diff options
Diffstat (limited to 'net/ipv4/ipvs')
-rw-r--r-- | net/ipv4/ipvs/ip_vs_ctl.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c index 61d023d58b5d..7345fc252a23 100644 --- a/net/ipv4/ipvs/ip_vs_ctl.c +++ b/net/ipv4/ipvs/ip_vs_ctl.c | |||
@@ -1792,24 +1792,8 @@ static const struct seq_operations ip_vs_info_seq_ops = { | |||
1792 | 1792 | ||
1793 | static int ip_vs_info_open(struct inode *inode, struct file *file) | 1793 | static int ip_vs_info_open(struct inode *inode, struct file *file) |
1794 | { | 1794 | { |
1795 | struct seq_file *seq; | 1795 | return seq_open_private(file, &ip_vs_info_seq_ops, |
1796 | int rc = -ENOMEM; | 1796 | sizeof(struct ip_vs_iter)); |
1797 | struct ip_vs_iter *s = kzalloc(sizeof(*s), GFP_KERNEL); | ||
1798 | |||
1799 | if (!s) | ||
1800 | goto out; | ||
1801 | |||
1802 | rc = seq_open(file, &ip_vs_info_seq_ops); | ||
1803 | if (rc) | ||
1804 | goto out_kfree; | ||
1805 | |||
1806 | seq = file->private_data; | ||
1807 | seq->private = s; | ||
1808 | out: | ||
1809 | return rc; | ||
1810 | out_kfree: | ||
1811 | kfree(s); | ||
1812 | goto out; | ||
1813 | } | 1797 | } |
1814 | 1798 | ||
1815 | static const struct file_operations ip_vs_info_fops = { | 1799 | static const struct file_operations ip_vs_info_fops = { |