Signed-off-by: Christoph Lameter <clameter@sgi.com>
---
net/core/sock.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: linux-2.6/net/core/sock.c
===================================================================
--- linux-2.6.orig/net/core/sock.c 2007-11-15 21:17:23.775404482 -0800
+++ linux-2.6/net/core/sock.c 2007-11-15 21:25:38.183201940 -0800
@@ -1809,21 +1809,21 @@ static LIST_HEAD(proto_list);
*/
static void inuse_add(struct proto *prot, int inc)
{
- per_cpu_ptr(prot->inuse_ptr, smp_processor_id())[0] += inc;
+ THIS_CPU(prot->inuse_ptr)[0] += inc;
}
static int inuse_get(const struct proto *prot)
{
int res = 0, cpu;
for_each_possible_cpu(cpu)
- res += per_cpu_ptr(prot->inuse_ptr, cpu)[0];
+ res += CPU_PTR(prot->inuse_ptr, cpu)[0];
return res;
}
static int inuse_init(struct proto *prot)
{
if (!prot->inuse_getval || !prot->inuse_add) {
- prot->inuse_ptr = alloc_percpu(int);
+ prot->inuse_ptr = CPU_ALLOC(int, GFP_KERNEL);
if (prot->inuse_ptr == NULL)
return -ENOBUFS;
@@ -1836,7 +1836,7 @@ static int inuse_init(struct proto *prot
static void inuse_fini(struct proto *prot)
{
if (prot->inuse_ptr != NULL) {
- free_percpu(prot->inuse_ptr);
+ CPU_FREE(prot->inuse_ptr);
prot->inuse_ptr = NULL;
prot->inuse_getval = NULL;
prot->inuse_add = NULL;
--
-
| Artem Bityutskiy | [PATCH 10/44 take 2] [UBI] debug unit implementation |
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| Trent Piepho | [PATCH] [POWERPC] Improve (in|out)_beXX() asm code |
| Dave Young | Re: Linux v2.6.24-rc1 |
git: | |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Linus Torvalds | Re: [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Natalie Protasevich | [BUG] New Kernel Bugs |
