Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67009
b: refs/heads/master
c: cf7732e
h: refs/heads/master
i:
  67007: 69f8841
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Oct 10, 2007
1 parent 0b9df4c commit 831c7b6
Show file tree
Hide file tree
Showing 16 changed files with 38 additions and 336 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 39699037a5c94d7cd1363dfe48a50c78c643fd9a
refs/heads/master: cf7732e4cc14b56d593ff53352673e1fd5e3ba52
20 changes: 2 additions & 18 deletions trunk/net/ipv4/arp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1378,24 +1378,8 @@ static const struct seq_operations arp_seq_ops = {

static 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 = {
Expand Down
20 changes: 2 additions & 18 deletions trunk/net/ipv4/fib_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -1039,24 +1039,8 @@ static const struct seq_operations fib_seq_ops = {

static 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 = {
Expand Down
42 changes: 4 additions & 38 deletions trunk/net/ipv4/fib_trie.c
Original file line number Diff line number Diff line change
Expand Up @@ -2379,25 +2379,8 @@ static const struct seq_operations fib_trie_seq_ops = {

static int fib_trie_seq_open(struct inode *inode, struct file *file)
{
struct seq_file *seq;
int rc = -ENOMEM;
struct fib_trie_iter *s = kmalloc(sizeof(*s), GFP_KERNEL);

if (!s)
goto out;

rc = seq_open(file, &fib_trie_seq_ops);
if (rc)
goto out_kfree;

seq = file->private_data;
seq->private = s;
memset(s, 0, sizeof(*s));
out:
return rc;
out_kfree:
kfree(s);
goto out;
return seq_open_private(file, &fib_trie_seq_ops,
sizeof(struct fib_trie_iter));
}

static const struct file_operations fib_trie_fops = {
Expand Down Expand Up @@ -2500,25 +2483,8 @@ static const struct seq_operations fib_route_seq_ops = {

static int fib_route_seq_open(struct inode *inode, struct file *file)
{
struct seq_file *seq;
int rc = -ENOMEM;
struct fib_trie_iter *s = kmalloc(sizeof(*s), GFP_KERNEL);

if (!s)
goto out;

rc = seq_open(file, &fib_route_seq_ops);
if (rc)
goto out_kfree;

seq = file->private_data;
seq->private = s;
memset(s, 0, sizeof(*s));
out:
return rc;
out_kfree:
kfree(s);
goto out;
return seq_open_private(file, &fib_route_seq_ops,
sizeof(struct fib_trie_iter));
}

static const struct file_operations fib_route_fops = {
Expand Down
38 changes: 4 additions & 34 deletions trunk/net/ipv4/igmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2410,23 +2410,8 @@ static const struct seq_operations igmp_mc_seq_ops = {

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 = {
Expand Down Expand Up @@ -2584,23 +2569,8 @@ static const struct seq_operations igmp_mcf_seq_ops = {

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 = {
Expand Down
43 changes: 4 additions & 39 deletions trunk/net/ipv4/ipmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1714,26 +1714,8 @@ static const struct seq_operations ipmr_vif_seq_ops = {

static int ipmr_vif_open(struct inode *inode, struct file *file)
{
struct seq_file *seq;
int rc = -ENOMEM;
struct ipmr_vif_iter *s = kmalloc(sizeof(*s), GFP_KERNEL);

if (!s)
goto out;

rc = seq_open(file, &ipmr_vif_seq_ops);
if (rc)
goto out_kfree;

s->ct = 0;
seq = file->private_data;
seq->private = s;
out:
return rc;
out_kfree:
kfree(s);
goto out;

return seq_open_private(file, &ipmr_vif_seq_ops,
sizeof(struct ipmr_vif_iter));
}

static const struct file_operations ipmr_vif_fops = {
Expand Down Expand Up @@ -1877,25 +1859,8 @@ static const struct seq_operations ipmr_mfc_seq_ops = {

static int ipmr_mfc_open(struct inode *inode, struct file *file)
{
struct seq_file *seq;
int rc = -ENOMEM;
struct ipmr_mfc_iter *s = kmalloc(sizeof(*s), GFP_KERNEL);

if (!s)
goto out;

rc = seq_open(file, &ipmr_mfc_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, &ipmr_mfc_seq_ops,
sizeof(struct ipmr_mfc_iter));
}

static const struct file_operations ipmr_mfc_fops = {
Expand Down
20 changes: 2 additions & 18 deletions trunk/net/ipv4/ipvs/ip_vs_ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1792,24 +1792,8 @@ static const struct seq_operations ip_vs_info_seq_ops = {

static 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 = {
Expand Down
20 changes: 2 additions & 18 deletions trunk/net/ipv4/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -902,24 +902,8 @@ static const struct seq_operations raw_seq_ops = {

static 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 = {
Expand Down
19 changes: 2 additions & 17 deletions trunk/net/ipv4/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,23 +375,8 @@ static const struct seq_operations rt_cache_seq_ops = {

static 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 = {
Expand Down
20 changes: 2 additions & 18 deletions trunk/net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2806,24 +2806,8 @@ static const struct seq_operations if6_seq_ops = {

static 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 = {
Expand Down
20 changes: 2 additions & 18 deletions trunk/net/ipv6/anycast.c
Original file line number Diff line number Diff line change
Expand Up @@ -549,24 +549,8 @@ static const struct seq_operations ac6_seq_ops = {

static 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 = {
Expand Down
20 changes: 2 additions & 18 deletions trunk/net/ipv6/ip6_flowlabel.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,24 +658,8 @@ static const struct seq_operations ip6fl_seq_ops = {

static 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 = {
Expand Down
Loading

0 comments on commit 831c7b6

Please sign in to comment.