Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[deliverable/linux.git] / net / ipv4 / netfilter / ipt_CLUSTERIP.c
index 965b08a7d738a2e40d6ff358a0d1bb14d1b9bffa..380d8daac72b8f304954bba42b3236a4079e7c64 100644 (file)
@@ -82,8 +82,8 @@ clusterip_config_put(struct clusterip_config *c)
 static inline void
 clusterip_config_entry_put(struct clusterip_config *c)
 {
+       write_lock_bh(&clusterip_lock);
        if (atomic_dec_and_test(&c->entries)) {
-               write_lock_bh(&clusterip_lock);
                list_del(&c->list);
                write_unlock_bh(&clusterip_lock);
 
@@ -96,7 +96,9 @@ clusterip_config_entry_put(struct clusterip_config *c)
 #ifdef CONFIG_PROC_FS
                remove_proc_entry(c->pde->name, c->pde->parent);
 #endif
+               return;
        }
+       write_unlock_bh(&clusterip_lock);
 }
 
 static struct clusterip_config *
This page took 0.025246 seconds and 5 git commands to generate.