diff options
| author | Gerald Schaefer <gerald.schaefer@de.ibm.com> | 2014-01-16 10:54:48 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-06 14:08:16 -0500 |
| commit | 55157010c2f4a1a92b3e275843d8f847ac89b8d9 (patch) | |
| tree | 59074a4a52cfc887e4d3a711d7bd4ea212f1d06d /net | |
| parent | 45a7ed6dd0ededc3c384394fe7ccec6a06142dea (diff) | |
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')
| -rw-r--r-- | net/rds/ib_recv.c | 7 |
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, | |||
| 421 | struct rds_ib_refill_cache *cache) | 421 | struct rds_ib_refill_cache *cache) |
| 422 | { | 422 | { |
| 423 | unsigned long flags; | 423 | unsigned long flags; |
| 424 | struct list_head *old; | 424 | struct list_head *old, *chpfirst; |
| 425 | struct list_head __percpu *chpfirst; | ||
| 426 | 425 | ||
| 427 | local_irq_save(flags); | 426 | local_irq_save(flags); |
| 428 | 427 | ||
| @@ -432,7 +431,7 @@ static void rds_ib_recv_cache_put(struct list_head *new_item, | |||
| 432 | else /* put on front */ | 431 | else /* put on front */ |
| 433 | list_add_tail(new_item, chpfirst); | 432 | list_add_tail(new_item, chpfirst); |
| 434 | 433 | ||
| 435 | __this_cpu_write(chpfirst, new_item); | 434 | __this_cpu_write(cache->percpu->first, new_item); |
| 436 | __this_cpu_inc(cache->percpu->count); | 435 | __this_cpu_inc(cache->percpu->count); |
| 437 | 436 | ||
| 438 | if (__this_cpu_read(cache->percpu->count) < RDS_IB_RECYCLE_BATCH_COUNT) | 437 | 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, | |||
| 452 | } while (old); | 451 | } while (old); |
| 453 | 452 | ||
| 454 | 453 | ||
| 455 | __this_cpu_write(chpfirst, NULL); | 454 | __this_cpu_write(cache->percpu->first, NULL); |
| 456 | __this_cpu_write(cache->percpu->count, 0); | 455 | __this_cpu_write(cache->percpu->count, 0); |
| 457 | end: | 456 | end: |
| 458 | local_irq_restore(flags); | 457 | local_irq_restore(flags); |
