git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-2.6.21' of master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
[pandora-kernel.git]
/
net
/
core
/
neighbour.c
diff --git
a/net/core/neighbour.c
b/net/core/neighbour.c
index
c5f161e
..
cfc6001
100644
(file)
--- a/
net/core/neighbour.c
+++ b/
net/core/neighbour.c
@@
-19,7
+19,6
@@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/socket.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/socket.h>
-#include <linux/sched.h>
#include <linux/netdevice.h>
#include <linux/proc_fs.h>
#ifdef CONFIG_SYSCTL
#include <linux/netdevice.h>
#include <linux/proc_fs.h>
#ifdef CONFIG_SYSCTL
@@
-63,7
+62,7
@@
void neigh_changeaddr(struct neigh_table *tbl, struct net_device *dev);
static struct neigh_table *neigh_tables;
#ifdef CONFIG_PROC_FS
static struct neigh_table *neigh_tables;
#ifdef CONFIG_PROC_FS
-static struct file_operations neigh_stat_seq_fops;
+static
const
struct file_operations neigh_stat_seq_fops;
#endif
/*
#endif
/*
@@
-141,6
+140,8
@@
static int neigh_forced_gc(struct neigh_table *tbl)
n->dead = 1;
shrunk = 1;
write_unlock(&n->lock);
n->dead = 1;
shrunk = 1;
write_unlock(&n->lock);
+ if (n->parms->neigh_cleanup)
+ n->parms->neigh_cleanup(n);
neigh_release(n);
continue;
}
neigh_release(n);
continue;
}
@@
-212,6
+213,8
@@
static void neigh_flush_dev(struct neigh_table *tbl, struct net_device *dev)
NEIGH_PRINTK2("neigh %p is stray.\n", n);
}
write_unlock(&n->lock);
NEIGH_PRINTK2("neigh %p is stray.\n", n);
}
write_unlock(&n->lock);
+ if (n->parms->neigh_cleanup)
+ n->parms->neigh_cleanup(n);
neigh_release(n);
}
}
neigh_release(n);
}
}
@@
-251,12
+254,10
@@
static struct neighbour *neigh_alloc(struct neigh_table *tbl)
goto out_entries;
}
goto out_entries;
}
- n = kmem_cache_alloc(tbl->kmem_cachep, GFP_ATOMIC);
+ n = kmem_cache_
z
alloc(tbl->kmem_cachep, GFP_ATOMIC);
if (!n)
goto out_entries;
if (!n)
goto out_entries;
- memset(n, 0, tbl->entry_size);
-
skb_queue_head_init(&n->arp_queue);
rwlock_init(&n->lock);
n->updated = n->used = now;
skb_queue_head_init(&n->arp_queue);
rwlock_init(&n->lock);
n->updated = n->used = now;
@@
-585,9
+586,6
@@
void neigh_destroy(struct neighbour *neigh)
kfree(hh);
}
kfree(hh);
}
- if (neigh->parms->neigh_destructor)
- (neigh->parms->neigh_destructor)(neigh);
-
skb_queue_purge(&neigh->arp_queue);
dev_put(neigh->dev);
skb_queue_purge(&neigh->arp_queue);
dev_put(neigh->dev);
@@
-678,6
+676,8
@@
static void neigh_periodic_timer(unsigned long arg)
*np = n->next;
n->dead = 1;
write_unlock(&n->lock);
*np = n->next;
n->dead = 1;
write_unlock(&n->lock);
+ if (n->parms->neigh_cleanup)
+ n->parms->neigh_cleanup(n);
neigh_release(n);
continue;
}
neigh_release(n);
continue;
}
@@
-2091,8
+2091,11
@@
void __neigh_for_each_release(struct neigh_table *tbl,
} else
np = &n->next;
write_unlock(&n->lock);
} else
np = &n->next;
write_unlock(&n->lock);
- if (release)
+ if (release) {
+ if (n->parms->neigh_cleanup)
+ n->parms->neigh_cleanup(n);
neigh_release(n);
neigh_release(n);
+ }
}
}
}
}
}
}
@@
-2405,7
+2408,7
@@
static int neigh_stat_seq_open(struct inode *inode, struct file *file)
return ret;
};
return ret;
};
-static struct file_operations neigh_stat_seq_fops = {
+static
const
struct file_operations neigh_stat_seq_fops = {
.owner = THIS_MODULE,
.open = neigh_stat_seq_open,
.read = seq_read,
.owner = THIS_MODULE,
.open = neigh_stat_seq_open,
.read = seq_read,
@@
-2710,7
+2713,7
@@
int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p,
t->neigh_proto_dir[0].child = t->neigh_neigh_dir;
t->neigh_root_dir[0].child = t->neigh_proto_dir;
t->neigh_proto_dir[0].child = t->neigh_neigh_dir;
t->neigh_root_dir[0].child = t->neigh_proto_dir;
- t->sysctl_header = register_sysctl_table(t->neigh_root_dir
, 0
);
+ t->sysctl_header = register_sysctl_table(t->neigh_root_dir);
if (!t->sysctl_header) {
err = -ENOBUFS;
goto free_procname;
if (!t->sysctl_header) {
err = -ENOBUFS;
goto free_procname;