]> git.ipfire.org Git - thirdparty/ipset.git/commitdiff
Use spinlock initiator instead of setting the locks directly (Jan Engelhardt).
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Fri, 6 Mar 2009 10:09:46 +0000 (11:09 +0100)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Fri, 6 Mar 2009 10:09:46 +0000 (11:09 +0100)
kernel/ip_set.c

index f52647fe57ff3c7bb19d84a4bd01ee8e51c2ac86..15e98d0c41035897072f85a9d27e6aa827da5864 100644 (file)
@@ -877,7 +877,7 @@ ip_set_create(const char *name,
        set = kmalloc(sizeof(struct ip_set), GFP_KERNEL);
        if (!set)
                return -ENOMEM;
-       set->lock = RW_LOCK_UNLOCKED;
+       rwlock_init(&set->lock);
        strncpy(set->name, name, IP_SET_MAXNAMELEN);
        set->binding = IP_SET_INVALID_ID;
        atomic_set(&set->ref, 0);