vserver 1.9.5.x5
[linux-2.6.git] / net / ipv6 / reassembly.c
index 7dac574..59e7c63 100644 (file)
@@ -103,7 +103,7 @@ struct frag_queue
 #define IP6Q_HASHSZ    64
 
 static struct frag_queue *ip6_frag_hash[IP6Q_HASHSZ];
-static rwlock_t ip6_frag_lock = RW_LOCK_UNLOCKED;
+static DEFINE_RWLOCK(ip6_frag_lock);
 static u32 ip6_frag_hash_rnd;
 static LIST_HEAD(ip6_frag_lru_list);
 int ip6_frag_nqueues = 0;
@@ -342,8 +342,8 @@ static struct frag_queue *ip6_frag_intern(unsigned int hash,
 #ifdef CONFIG_SMP
        for (fq = ip6_frag_hash[hash]; fq; fq = fq->next) {
                if (fq->id == fq_in->id && 
-                   !ipv6_addr_cmp(&fq_in->saddr, &fq->saddr) &&
-                   !ipv6_addr_cmp(&fq_in->daddr, &fq->daddr)) {
+                   ipv6_addr_equal(&fq_in->saddr, &fq->saddr) &&
+                   ipv6_addr_equal(&fq_in->daddr, &fq->daddr)) {
                        atomic_inc(&fq->refcnt);
                        write_unlock(&ip6_frag_lock);
                        fq_in->last_in |= COMPLETE;
@@ -387,7 +387,7 @@ ip6_frag_create(unsigned int hash, u32 id, struct in6_addr *src, struct in6_addr
        init_timer(&fq->timer);
        fq->timer.function = ip6_frag_expire;
        fq->timer.data = (long) fq;
-       fq->lock = SPIN_LOCK_UNLOCKED;
+       spin_lock_init(&fq->lock);
        atomic_set(&fq->refcnt, 1);
 
        return ip6_frag_intern(hash, fq);
@@ -406,8 +406,8 @@ fq_find(u32 id, struct in6_addr *src, struct in6_addr *dst)
        read_lock(&ip6_frag_lock);
        for(fq = ip6_frag_hash[hash]; fq; fq = fq->next) {
                if (fq->id == id && 
-                   !ipv6_addr_cmp(src, &fq->saddr) &&
-                   !ipv6_addr_cmp(dst, &fq->daddr)) {
+                   ipv6_addr_equal(src, &fq->saddr) &&
+                   ipv6_addr_equal(dst, &fq->daddr)) {
                        atomic_inc(&fq->refcnt);
                        read_unlock(&ip6_frag_lock);
                        return fq;