summaryrefslogtreecommitdiff
path: root/net/rds
diff options
context:
space:
mode:
authorGerald Schaefer <gerald.schaefer@de.ibm.com>2014-01-16 16:54:48 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-06 11:22:20 -0800
commitc2d828a8e5dcea50926bde6277741aafb4ca4927 (patch)
treebc9b234beb2ab4b3125948e40454ef730dda1549 /net/rds
parente9f138ed4e403136240d0ea3dce7167f14adcdba (diff)
downloadlinux-stable-c2d828a8e5dcea50926bde6277741aafb4ca4927.tar.gz
linux-stable-c2d828a8e5dcea50926bde6277741aafb4ca4927.tar.bz2
linux-stable-c2d828a8e5dcea50926bde6277741aafb4ca4927.zip
net: rds: fix per-cpu helper usage
[ Upstream commit c196403b79aa241c3fefb3ee5bb328aa7c5cc860 ] commit ae4b46e9d "net: rds: use this_cpu_* per-cpu helper" broke per-cpu handling for rds. chpfirst is the result of __this_cpu_read(), so it is an absolute pointer and not __percpu. Therefore, __this_cpu_write() should not operate on chpfirst, but rather on cache->percpu->first, just like __this_cpu_read() did before. Signed-off-byd Gerald Schaefer <gerald.schaefer@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/rds')
-rw-r--r--net/rds/ib_recv.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c
index 8eb9501e3d60..b7ebe23cdedf 100644
--- a/net/rds/ib_recv.c
+++ b/net/rds/ib_recv.c
@@ -421,8 +421,7 @@ static void rds_ib_recv_cache_put(struct list_head *new_item,
struct rds_ib_refill_cache *cache)
{
unsigned long flags;
- struct list_head *old;
- struct list_head __percpu *chpfirst;
+ struct list_head *old, *chpfirst;
local_irq_save(flags);
@@ -432,7 +431,7 @@ static void rds_ib_recv_cache_put(struct list_head *new_item,
else /* put on front */
list_add_tail(new_item, chpfirst);
- __this_cpu_write(chpfirst, new_item);
+ __this_cpu_write(cache->percpu->first, new_item);
__this_cpu_inc(cache->percpu->count);
if (__this_cpu_read(cache->percpu->count) < RDS_IB_RECYCLE_BATCH_COUNT)
@@ -452,7 +451,7 @@ static void rds_ib_recv_cache_put(struct list_head *new_item,
} while (old);
- __this_cpu_write(chpfirst, NULL);
+ __this_cpu_write(cache->percpu->first, NULL);
__this_cpu_write(cache->percpu->count, 0);
end:
local_irq_restore(flags);