diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2007-08-11 00:50:30 +0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-08-14 07:52:15 +0200 |
commit | cae7ca3d3de48851e929de9469397749638df779 (patch) | |
tree | 2919ea031c5dcc43668f080faa3a463ac04cfed6 /net | |
parent | [NET]: Share correct feature code between bridging and bonding (diff) | |
download | linux-cae7ca3d3de48851e929de9469397749638df779.tar.xz linux-cae7ca3d3de48851e929de9469397749638df779.zip |
[IPVS]: Use IP_VS_WAIT_WHILE when encessary.
For architectures that don't have a volatile atomic_ts constructs like
while (atomic_read(&something)); might result in endless loops since a
barrier() is missing which forces the compiler to generate code that
actually reads memory contents.
Fix this in ipvs by using the IP_VS_WAIT_WHILE macro which resolves to
while (expr) { cpu_relax(); }
(why isn't this open coded btw?)
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/ipvs/ip_vs_ctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c index c32781d0ead2..902fd578aa3c 100644 --- a/net/ipv4/ipvs/ip_vs_ctl.c +++ b/net/ipv4/ipvs/ip_vs_ctl.c @@ -908,7 +908,7 @@ ip_vs_edit_dest(struct ip_vs_service *svc, struct ip_vs_dest_user *udest) write_lock_bh(&__ip_vs_svc_lock); /* Wait until all other svc users go away */ - while (atomic_read(&svc->usecnt) > 1) {}; + IP_VS_WAIT_WHILE(atomic_read(&svc->usecnt) > 1); /* call the update_service, because server weight may be changed */ svc->scheduler->update_service(svc); |