Consolidate private allocations in seq files
Subsystems (9)
cover Consolidate private allocations in seq files
Many (very many) seq files in net/ allocate some private data to use it later (mostly for iteration state). All this code was obviously get using copy-paste method, so move it into one place.
Almost all of these places either set this private to 0, or keep uninitialized. Some places, however, pre-initialize this area, but there are few of them.
The seq_open_private() call just opens the seq file with allocated and set to zero area. The __seq_open_private() call makes the same, but returns the allocated memory to the called to be initialized later.
I didn't measure how much of the .text section this saves, but I suspect a lot of :) As far as the code is concerned, this set saves ~450 lines.
Such thing may be useful for any subsystem, but I found this mostly in the networking code and fixed only it (for a while).
PATCH 1/6 Introduce the seq_open_private()
This function allocates the zeroed chunk of memory and call seq_open(). The __seq_open_private() helper returns the allocated memory to make it possible for the caller to initialize it.
---
fs/seq_file.c +33 -0
@@ -429,6 +429,39 @@ int seq_release_private(struct inode *in }EXPORT_SYMBOL (seq_release_private); +void *__seq_open_private (struct file *f,const struct seq_operations *ops, +int psize) +{ +int rc; +void *private; +struct seq_file *seq; + + private =kzalloc (psize,GFP_KERNEL ); +if (private ==NULL ) + goto out; + + rc =seq_open (f, ops); +if (rc <0 ) + goto out_free; + + seq = f->private_data; + seq->private = private; +return private; + +out_free: +kfree (private); +out: +return NULL ; +} +EXPORT_SYMBOL (__seq_open_private); + +int seq_open_private (struct file *filp,const struct seq_operations *ops, +int psize) +{ +return __seq_open_private (filp, ops, psize) ?0 : -ENOMEM ; +} +EXPORT_SYMBOL (seq_open_private); +int seq_putc (struct seq_file *m,char c) {if (m->count < m->size) {
include/linux/seq_file.h +2 -0
@@ -46,6 +46,8 @@ int seq_path(struct seq_file *, struct vint single_open (struct file *,int (*)(struct seq_file *,void *),void *);int single_release (struct inode *,struct file *); +void *__seq_open_private (struct file *,const struct seq_operations *,int ); +int seq_open_private (struct file *,const struct seq_operations *,int );int seq_release_private (struct inode *,struct file *);#define SEQ_START_TOKEN ((void *)1)
PATCH 2/6 Make core networking code use seq_open_private
In reply to Pavel EmelyanovThis concerns the ipv4 and ipv6 code mostly, but also the netlink and unix sockets.
The netlink code is an example of how to use the __seq_open_private() call - it saves the net namespace on this private.
---
net/ipv4/arp.c +2 -18
@@ -1378,24 +1378,8 @@ static const struct seq_operations arp_sstatic int arp_seq_open (struct inode *inode,struct file *file) { -struct seq_file *seq; -int rc = -ENOMEM ; -struct neigh_seq_state *s =kzalloc (sizeof (*s),GFP_KERNEL ); - -if (!s) - goto out; - - rc =seq_open (file, &arp_seq_ops); -if (rc) - goto out_kfree; - - seq = file->private_data; - seq->private = s; -out: -return rc; -out_kfree: -kfree (s); - goto out; +return seq_open_private (file, &arp_seq_ops, +sizeof (struct neigh_seq_state )); }static const struct file_operations arp_seq_fops = {
net/ipv4/fib_hash.c +2 -18
@@ -1039,24 +1039,8 @@ static const struct seq_operations fib_sstatic int fib_seq_open (struct inode *inode,struct file *file) { -struct seq_file *seq; -int rc = -ENOMEM ; -struct fib_iter_state *s =kzalloc (sizeof (*s),GFP_KERNEL ); - -if (!s) - goto out; - - rc =seq_open (file, &fib_seq_ops); -if (rc) - goto out_kfree; - - seq = file->private_data; - seq->private = s; -out: -return rc; -out_kfree: -kfree (s); - goto out; +return seq_open_private (file, &fib_seq_ops, +sizeof (struct fib_iter_state )); }static const struct file_operations fib_seq_fops = {
net/ipv4/fib_trie.c +4 -38
54 lines not on this page · raw message
net/ipv4/igmp.c +4 -34
@@ -2410,23 +2410,8 @@ static const struct seq_operations igmp_static int igmp_mc_seq_open (struct inode *inode,struct file *file) { -struct seq_file *seq; -int rc = -ENOMEM ; -struct igmp_mc_iter_state *s =kzalloc (sizeof (*s),GFP_KERNEL ); - -if (!s) - goto out; - rc =seq_open (file, &igmp_mc_seq_ops); -if (rc) - goto out_kfree; - - seq = file->private_data; - seq->private = s; -out: -return rc; -out_kfree: -kfree (s); - goto out; +return seq_open_private (file, &igmp_mc_seq_ops, +sizeof (struct igmp_mc_iter_state )); }static const struct file_operations igmp_mc_seq_fops = {
@@ -2584,23 +2569,8 @@ static const struct seq_operations igmp_static int igmp_mcf_seq_open (struct inode *inode,struct file *file) { -struct seq_file *seq; -int rc = -ENOMEM ; -struct igmp_mcf_iter_state *s =kzalloc (sizeof (*s),GFP_KERNEL ); - -if (!s) - goto out; - rc =seq_open (file, &igmp_mcf_seq_ops); -if (rc) - goto out_kfree; - - seq = file->private_data; - seq->private = s; -out: -return rc; -out_kfree: -kfree (s); - goto out; +return seq_open_private (file, &igmp_mcf_seq_ops, +sizeof (struct igmp_mcf_iter_state )); }static const struct file_operations igmp_mcf_seq_fops = {
net/ipv4/ipmr.c +4 -39
55 lines not on this page · raw message
net/ipv4/ipvs/ip_vs_ctl.c +2 -18
@@ -1792,24 +1792,8 @@ static const struct seq_operations ip_vsstatic int ip_vs_info_open (struct inode *inode,struct file *file) { -struct seq_file *seq; -int rc = -ENOMEM ; -struct ip_vs_iter *s =kzalloc (sizeof (*s),GFP_KERNEL ); - -if (!s) - goto out; - - rc =seq_open (file, &ip_vs_info_seq_ops); -if (rc) - goto out_kfree; - - seq = file->private_data; - seq->private = s; -out: -return rc; -out_kfree: -kfree (s); - goto out; +return seq_open_private (file, &ip_vs_info_seq_ops, +sizeof (struct ip_vs_iter )); }static const struct file_operations ip_vs_info_fops = {
net/ipv4/raw.c +2 -18
@@ -902,24 +902,8 @@ static const struct seq_operations raw_sstatic int raw_seq_open (struct inode *inode,struct file *file) { -struct seq_file *seq; -int rc = -ENOMEM ; -struct raw_iter_state *s; - - s =kzalloc (sizeof (*s),GFP_KERNEL ); -if (!s) - goto out; - rc =seq_open (file, &raw_seq_ops); -if (rc) - goto out_kfree; - - seq = file->private_data; - seq->private = s; -out: -return rc; -out_kfree: -kfree (s); - goto out; +return seq_open_private (file, &raw_seq_ops, +sizeof (struct raw_iter_state )); }static const struct file_operations raw_seq_fops = {
net/ipv4/route.c +2 -17
@@ -375,23 +375,8 @@ static const struct seq_operations rt_castatic int rt_cache_seq_open (struct inode *inode,struct file *file) { -struct seq_file *seq; -int rc = -ENOMEM ; -struct rt_cache_iter_state *s; - - s =kzalloc (sizeof (*s),GFP_KERNEL ); -if (!s) - goto out; - rc =seq_open (file, &rt_cache_seq_ops); -if (rc) - goto out_kfree; - seq = file->private_data; - seq->private = s; -out: -return rc; -out_kfree: -kfree (s); - goto out; +return seq_open_private (file, &rt_cache_seq_ops, +sizeof (struct rt_cache_iter_state )); }static const struct file_operations rt_cache_seq_fops = {
net/ipv6/addrconf.c +2 -18
@@ -2806,24 +2806,8 @@ static const struct seq_operations if6_sstatic int if6_seq_open (struct inode *inode,struct file *file) { -struct seq_file *seq; -int rc = -ENOMEM ; -struct if6_iter_state *s =kzalloc (sizeof (*s),GFP_KERNEL ); - -if (!s) - goto out; - - rc =seq_open (file, &if6_seq_ops); -if (rc) - goto out_kfree; - - seq = file->private_data; - seq->private = s; -out: -return rc; -out_kfree: -kfree (s); - goto out; +return seq_open_private (file, &if6_seq_ops, +sizeof (struct if6_iter_state )); }static const struct file_operations if6_fops = {
net/ipv6/anycast.c +2 -18
@@ -549,24 +549,8 @@ static const struct seq_operations ac6_sstatic int ac6_seq_open (struct inode *inode,struct file *file) { -struct seq_file *seq; -int rc = -ENOMEM ; -struct ac6_iter_state *s =kzalloc (sizeof (*s),GFP_KERNEL ); - -if (!s) - goto out; - - rc =seq_open (file, &ac6_seq_ops); -if (rc) - goto out_kfree; - - seq = file->private_data; - seq->private = s; -out: -return rc; -out_kfree: -kfree (s); - goto out; +return seq_open_private (file, &ac6_seq_ops, +sizeof (struct ac6_iter_state )); }static const struct file_operations ac6_seq_fops = {
net/ipv6/ip6_flowlabel.c +2 -18
@@ -658,24 +658,8 @@ static const struct seq_operations ip6flstatic int ip6fl_seq_open (struct inode *inode,struct file *file) { -struct seq_file *seq; -int rc = -ENOMEM ; -struct ip6fl_iter_state *s =kzalloc (sizeof (*s),GFP_KERNEL ); - -if (!s) - goto out; - - rc =seq_open (file, &ip6fl_seq_ops); -if (rc) - goto out_kfree; - - seq = file->private_data; - seq->private = s; -out: -return rc; -out_kfree: -kfree (s); - goto out; +return seq_open_private (file, &ip6fl_seq_ops, +sizeof (struct ip6fl_iter_state )); }static const struct file_operations ip6fl_seq_fops = {
net/ipv6/mcast.c +4 -36
@@ -2426,24 +2426,8 @@ static const struct seq_operations igmp6static int igmp6_mc_seq_open (struct inode *inode,struct file *file) { -struct seq_file *seq; -int rc = -ENOMEM ; -struct igmp6_mc_iter_state *s =kzalloc (sizeof (*s),GFP_KERNEL ); - -if (!s) - goto out; - - rc =seq_open (file, &igmp6_mc_seq_ops); -if (rc) - goto out_kfree; - - seq = file->private_data; - seq->private = s; -out: -return rc; -out_kfree: -kfree (s); - goto out; +return seq_open_private (file, &igmp6_mc_seq_ops, +sizeof (struct igmp6_mc_iter_state )); }static const struct file_operations igmp6_mc_seq_fops = {
@@ -2600,24 +2584,8 @@ static const struct seq_operations igmp6static int igmp6_mcf_seq_open (struct inode *inode,struct file *file) { -struct seq_file *seq; -int rc = -ENOMEM ; -struct igmp6_mcf_iter_state *s =kzalloc (sizeof (*s),GFP_KERNEL ); - -if (!s) - goto out; - - rc =seq_open (file, &igmp6_mcf_seq_ops); -if (rc) - goto out_kfree; - - seq = file->private_data; - seq->private = s; -out: -return rc; -out_kfree: -kfree (s); - goto out; +return seq_open_private (file, &igmp6_mcf_seq_ops, +sizeof (struct igmp6_mcf_iter_state )); }static const struct file_operations igmp6_mcf_seq_fops = {
net/ipv6/raw.c +2 -15
@@ -1289,21 +1289,8 @@ static const struct seq_operations raw6_static int raw6_seq_open (struct inode *inode,struct file *file) { -struct seq_file *seq; -int rc = -ENOMEM ; -struct raw6_iter_state *s =kzalloc (sizeof (*s),GFP_KERNEL ); -if (!s) - goto out; - rc =seq_open (file, &raw6_seq_ops); -if (rc) - goto out_kfree; - seq = file->private_data; - seq->private = s; -out: -return rc; -out_kfree: -kfree (s); - goto out; +return seq_open_private (file, &raw6_seq_ops, +sizeof (struct raw6_iter_state )); }static const struct file_operations raw6_seq_fops = {
net/netlink/af_netlink.c +2 -11
@@ -1845,27 +1845,18 @@ static const struct seq_operations netlistatic int netlink_seq_open (struct inode *inode,struct file *file) { -struct seq_file *seq;struct nl_seq_iter *iter; -int err; - iter =kzalloc (sizeof (*iter),GFP_KERNEL ); + iter =__seq_open_private (file, &netlink_seq_ops,sizeof (*iter));if (!iter)return -ENOMEM ; - err =seq_open (file, &netlink_seq_ops); -if (err) { -kfree (iter); -return err; - } - - seq = file->private_data; - seq->private = iter; iter->net =get_proc_net (inode);if (!iter->net) {seq_release_private (inode, file);return -ENXIO ; } +return 0 ; }
net/unix/af_unix.c +1 -19
@@ -2086,25 +2086,7 @@ static const struct seq_operations unix_static int unix_seq_open (struct inode *inode,struct file *file) { -struct seq_file *seq; -int rc = -ENOMEM ; -int *iter =kmalloc (sizeof (int ),GFP_KERNEL ); - -if (!iter) - goto out; - - rc =seq_open (file, &unix_seq_ops); -if (rc) - goto out_kfree; - - seq = file->private_data; - seq->private = iter; - *iter =0 ; -out: -return rc; -out_kfree: -kfree (iter); - goto out; +return seq_open_private (file, &unix_seq_ops,sizeof (int )); }static const struct file_operations unix_seq_fops = {
PATCH 3/6 Make netfilter code use the seq_open_private
In reply to Pavel EmelyanovJust switch to the consolidated calls.
ipt_recent() has to initialize the private, so use the __seq_open_private() helper.
---
net/ipv4/netfilter/ipt_recent.c +2 -13
@@ -381,25 +381,14 @@ static const struct seq_operations recenstatic int recent_seq_open (struct inode *inode,struct file *file) {struct proc_dir_entry *pde =PDE (inode); -struct seq_file *seq;struct recent_iter_state *st; -int ret; - st =kzalloc (sizeof (*st),GFP_KERNEL ); + st =__seq_open_private (file, &recent_seq_ops,sizeof (*st));if (st ==NULL )return -ENOMEM ; - ret =seq_open (file, &recent_seq_ops); -if (ret) { -kfree (st); - goto out; - } - st->table = pde->data; - seq = file->private_data; - seq->private = st; -out: -return ret; +return 0 ; } static ssize_t recent_proc_write(struct file *file, const char __user *input,
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c +4 -32
@@ -174,22 +174,8 @@ static const struct seq_operations ct_sestatic int ct_open (struct inode *inode,struct file *file) { -struct seq_file *seq; -struct ct_iter_state *st; -int ret; - - st =kzalloc (sizeof (struct ct_iter_state ),GFP_KERNEL ); -if (st ==NULL ) -return -ENOMEM ; - ret =seq_open (file, &ct_seq_ops); -if (ret) - goto out_free; - seq = file->private_data; - seq->private = st; -return ret; -out_free: -kfree (st); -return ret; +return seq_open_private (file, &ct_seq_ops, +sizeof (struct ct_iter_state )); }static const struct file_operations ct_file_ops = {
@@ -291,22 +277,8 @@ static const struct seq_operations exp_sstatic int exp_open (struct inode *inode,struct file *file) { -struct seq_file *seq; -struct ct_expect_iter_state *st; -int ret; - - st =kzalloc (sizeof (struct ct_expect_iter_state ),GFP_KERNEL ); -if (!st) -return -ENOMEM ; - ret =seq_open (file, &exp_seq_ops); -if (ret) - goto out_free; - seq = file->private_data; - seq->private = st; -return ret; -out_free: -kfree (st); -return ret; +return seq_open_private (file, &exp_seq_ops, +sizeof (struct ct_expect_iter_state )); }static const struct file_operations ip_exp_file_ops = {
net/netfilter/nf_conntrack_expect.c +2 -16
@@ -472,22 +472,8 @@ static const struct seq_operations exp_sstatic int exp_open (struct inode *inode,struct file *file) { -struct seq_file *seq; -struct ct_expect_iter_state *st; -int ret; - - st =kzalloc (sizeof (struct ct_expect_iter_state ),GFP_KERNEL ); -if (!st) -return -ENOMEM ; - ret =seq_open (file, &exp_seq_ops); -if (ret) - goto out_free; - seq = file->private_data; - seq->private = st; -return ret; -out_free: -kfree (st); -return ret; +return seq_open_private (file, &exp_seq_ops, +sizeof (struct ct_expect_iter_state )); }static const struct file_operations exp_file_ops = {
net/netfilter/nf_conntrack_standalone.c +2 -16
@@ -195,22 +195,8 @@ static const struct seq_operations ct_sestatic int ct_open (struct inode *inode,struct file *file) { -struct seq_file *seq; -struct ct_iter_state *st; -int ret; - - st =kzalloc (sizeof (struct ct_iter_state ),GFP_KERNEL ); -if (st ==NULL ) -return -ENOMEM ; - ret =seq_open (file, &ct_seq_ops); -if (ret) - goto out_free; - seq = file->private_data; - seq->private = st; -return ret; -out_free: -kfree (st); -return ret; +return seq_open_private (file, &ct_seq_ops, +sizeof (struct ct_iter_state )); }static const struct file_operations ct_file_ops = {
net/netfilter/nfnetlink_log.c +2 -16
@@ -951,22 +951,8 @@ static const struct seq_operations nful_static int nful_open (struct inode *inode,struct file *file) { -struct seq_file *seq; -struct iter_state *is; -int ret; - - is =kzalloc (sizeof (*is),GFP_KERNEL ); -if (!is) -return -ENOMEM ; - ret =seq_open (file, &nful_seq_ops); -if (ret <0 ) - goto out_free; - seq = file->private_data; - seq->private = is; -return ret; -out_free: -kfree (is); -return ret; +return seq_open_private (file, &nful_seq_ops, +sizeof (struct iter_state )); }static const struct file_operations nful_file_ops = {
net/netfilter/nfnetlink_queue.c +2 -16
@@ -1051,22 +1051,8 @@ static const struct seq_operations nfqnlstatic int nfqnl_open (struct inode *inode,struct file *file) { -struct seq_file *seq; -struct iter_state *is; -int ret; - - is =kzalloc (sizeof (*is),GFP_KERNEL ); -if (!is) -return -ENOMEM ; - ret =seq_open (file, &nfqnl_seq_ops); -if (ret <0 ) - goto out_free; - seq = file->private_data; - seq->private = is; -return ret; -out_free: -kfree (is); -return ret; +return seq_open_private (file, &nfqnl_seq_ops, +sizeof (struct iter_state )); }static const struct file_operations nfqnl_file_ops = {
PATCH 4/6 Make decnet code use the seq_open_private()
In reply to Pavel EmelyanovJust switch to the consolidated code.
---
net/decnet/dn_neigh.c +2 -18
@@ -580,24 +580,8 @@ static const struct seq_operations dn_nestatic int dn_neigh_seq_open (struct inode *inode,struct file *file) { -struct seq_file *seq; -int rc = -ENOMEM ; -struct neigh_seq_state *s =kzalloc (sizeof (*s),GFP_KERNEL ); - -if (!s) - goto out; - - rc =seq_open (file, &dn_neigh_seq_ops); -if (rc) - goto out_kfree; - - seq = file->private_data; - seq->private = s; -out: -return rc; -out_kfree: -kfree (s); - goto out; +return seq_open_private (file, &dn_neigh_seq_ops, +sizeof (struct neigh_seq_state )); }static const struct file_operations dn_neigh_seq_fops = {
net/decnet/dn_route.c +2 -17
@@ -1739,23 +1739,8 @@ static const struct seq_operations dn_rtstatic int dn_rt_cache_seq_open (struct inode *inode,struct file *file) { -struct seq_file *seq; -int rc = -ENOMEM ; -struct dn_rt_cache_iter_state *s; - - s =kzalloc (sizeof (*s),GFP_KERNEL ); -if (!s) - goto out; - rc =seq_open (file, &dn_rt_cache_seq_ops); -if (rc) - goto out_kfree; - seq = file->private_data; - seq->private = s; -out: -return rc; -out_kfree: -kfree (s); - goto out; +return seq_open_private (file, &dn_rt_cache_seq_ops, +sizeof (struct dn_rt_cache_iter_state )); }static const struct file_operations dn_rt_cache_seq_fops = {
PATCH 5/6 Make the IRDA use the seq_open_private()
In reply to Pavel EmelyanovJust switch to the consolidated code
---
net/irda/irlap.c +4 -22
@@ -1219,29 +1219,11 @@ static const struct seq_operations irlapstatic int irlap_seq_open (struct inode *inode,struct file *file) { -struct seq_file *seq; -int rc = -ENOMEM ; -struct irlap_iter_state *s =kzalloc (sizeof (*s),GFP_KERNEL ); +if (irlap ==NULL ) +return -EINVAL ; -if (!s) - goto out; - -if (irlap ==NULL ) { - rc = -EINVAL ; - goto out_kfree; - } - - rc =seq_open (file, &irlap_seq_ops); -if (rc) - goto out_kfree; - - seq = file->private_data; - seq->private = s; -out: -return rc; -out_kfree: -kfree (s); - goto out; +return seq_open_private (file, &irlap_seq_ops, +sizeof (struct irlap_iter_state )); }const struct file_operations irlap_seq_fops = {
net/irda/irlmp.c +2 -19
@@ -2003,27 +2003,10 @@ static const struct seq_operations irlmpstatic int irlmp_seq_open (struct inode *inode,struct file *file) { -struct seq_file *seq; -int rc = -ENOMEM ; -struct irlmp_iter_state *s; - IRDA_ASSERT(irlmp != NULL, return -EINVAL;); - s =kmalloc (sizeof (*s),GFP_KERNEL ); -if (!s) - goto out; - - rc =seq_open (file, &irlmp_seq_ops); -if (rc) - goto out_kfree; - - seq = file->private_data; - seq->private = s; -out: -return rc; -out_kfree: -kfree (s); - goto out; +return seq_open_private (file, &irlmp_seq_ops, +sizeof (struct irlmp_iter_state )); }const struct file_operations irlmp_seq_fops = {
net/irda/irttp.c +2 -19
@@ -1884,25 +1884,8 @@ static const struct seq_operations irttpstatic int irttp_seq_open (struct inode *inode,struct file *file) { -struct seq_file *seq; -int rc = -ENOMEM ; -struct irttp_iter_state *s; - - s =kzalloc (sizeof (*s),GFP_KERNEL ); -if (!s) - goto out; - - rc =seq_open (file, &irttp_seq_ops); -if (rc) - goto out_kfree; - - seq = file->private_data; - seq->private = s; -out: -return rc; -out_kfree: -kfree (s); - goto out; +return seq_open_private (file, &irttp_seq_ops, +sizeof (struct irttp_iter_state )); }const struct file_operations irttp_seq_fops = {
PATCH 6/6 Make the sunrpc use the seq_open_private()
In reply to Pavel EmelyanovJust switch to the consolidated code.
---
net/sunrpc/cache.c +2 -10
@@ -1218,23 +1218,15 @@ static const struct seq_operations cachestatic int content_open (struct inode *inode,struct file *file) { -int res;struct handle *han;struct cache_detail *cd =PDE (inode)->data; - han =kmalloc (sizeof (*han),GFP_KERNEL ); + han =__seq_open_private (file, &cache_content_op,sizeof (*han));if (han ==NULL )return -ENOMEM ; han->cd = cd; - - res =seq_open (file, &cache_content_op); -if (res) -kfree (han); -else - ((struct seq_file *)file->private_data)->private = han; - -return res; +return 0 ; }static const struct file_operations content_file_operations = {
Re: [PATCH 1/6][NET-2.6.24] Introduce the seq_open_private()
In reply to Pavel EmelyanovFrom: Pavel Emelyanov <[email protected]>
Date: Tue, 09 Oct 2007 19:52:58 +0400
Quoted 6 lines
This function allocates the zeroed chunk of memory and call
seq_open(). The__seq_open_private()helper returns the allocated memory to make it possible for the caller to initialize it.Signed-off-by Pavel Emelyanov <[email protected]>
Applied, nice cleanup Pavel.
Re: [PATCH 2/6][NET-2.6.24] Make core networking code use seq_open_private
In reply to Pavel EmelyanovFrom: Pavel Emelyanov <[email protected]>
Date: Tue, 09 Oct 2007 19:55:28 +0400
Quoted 7 lines
This concerns the ipv4 and ipv6 code mostly, but also the netlink and unix sockets.
The netlink code is an example of how to use the
__seq_open_private()call - it saves the net namespace on this private.Signed-off-by Pavel Emelyanov <[email protected]>
Applied.
Re: [PATCH 3/6][NET-2.6.24] Make netfilter code use the seq_open_private
In reply to Pavel EmelyanovFrom: Pavel Emelyanov <[email protected]>
Date: Tue, 09 Oct 2007 19:57:29 +0400
Quoted 7 lines
Just switch to the consolidated calls.
ipt_recent()has to initialize the private, so use the__seq_open_private()helper.Signed-off-by Pavel Emelyanov <[email protected]>Cc Patrick McHardy <[email protected]>
Applied.
Re: [PATCH 4/6][NET-2.6.24] Make decnet code use the seq_open_private()
In reply to Pavel EmelyanovFrom: Pavel Emelyanov <[email protected]>
Date: Tue, 09 Oct 2007 19:59:38 +0400
Quoted 4 lines
Just switch to the consolidated code.
Signed-off-by Pavel Emelyanov <[email protected]>Cc Patrick Caulfield <[email protected]>
Applied.
Re: [PATCH 5/6][NET-2.6.24] Make the IRDA use the seq_open_private()
In reply to Pavel EmelyanovFrom: Pavel Emelyanov <[email protected]>
Date: Tue, 09 Oct 2007 20:01:32 +0400
Quoted 4 lines
Just switch to the consolidated code
Signed-off-by Pavel Emelyanov <[email protected]>Cc Samuel Ortiz <[email protected]>
Applied.
Re: [PATCH 6/6][NET-2.6.24] Make the sunrpc use the seq_open_private()
In reply to Pavel EmelyanovFrom: Pavel Emelyanov <[email protected]>
Date: Tue, 09 Oct 2007 20:04:23 +0400
Quoted 4 lines
Just switch to the consolidated code.
Signed-off-by Pavel Emelyanov <[email protected]>Cc Neil Brown <[email protected]>
Applied.