X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=net%2Fipv4%2Finetpeer.c;h=9942d1146828ae90b9f800721553e700014a1d23;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=d7da79d5b20595b53ace58e96bab72162a90d1c6;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c index d7da79d5b..9942d1146 100644 --- a/net/ipv4/inetpeer.c +++ b/net/ipv4/inetpeer.c @@ -70,7 +70,7 @@ */ /* Exported for inet_getid inline function. */ -spinlock_t inet_peer_idlock = SPIN_LOCK_UNLOCKED; +DEFINE_SPINLOCK(inet_peer_idlock); static kmem_cache_t *peer_cachep; @@ -82,7 +82,7 @@ static struct inet_peer peer_fake_node = { }; #define peer_avl_empty (&peer_fake_node) static struct inet_peer *peer_root = peer_avl_empty; -static rwlock_t peer_pool_lock = RW_LOCK_UNLOCKED; +static DEFINE_RWLOCK(peer_pool_lock); #define PEER_MAXDEPTH 40 /* sufficient for about 2^27 nodes */ static volatile int peer_total; @@ -95,7 +95,7 @@ int inet_peer_maxttl = 10 * 60 * HZ; /* usual time to live: 10 min */ /* Exported for inet_putpeer inline function. */ struct inet_peer *inet_peer_unused_head, **inet_peer_unused_tailp = &inet_peer_unused_head; -spinlock_t inet_peer_unused_lock = SPIN_LOCK_UNLOCKED; +DEFINE_SPINLOCK(inet_peer_unused_lock); #define PEER_MAX_CLEANUP_WORK 30 static void peer_check_expire(unsigned long dummy);