Merge branch 'core/rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[pandora-kernel.git] / net / netlabel / netlabel_domainhash.c
index 9a8ea01..643c032 100644 (file)
@@ -30,8 +30,7 @@
  */
 
 #include <linux/types.h>
-#include <linux/rcupdate.h>
-#include <linux/list.h>
+#include <linux/rculist.h>
 #include <linux/skbuff.h>
 #include <linux/spinlock.h>
 #include <linux/string.h>
@@ -150,11 +149,11 @@ static struct netlbl_dom_map *netlbl_domhsh_search_def(const char *domain)
        entry = netlbl_domhsh_search(domain);
        if (entry == NULL) {
                entry = rcu_dereference(netlbl_domhsh_def);
-               if (entry != NULL && entry->valid)
-                       return entry;
+               if (entry != NULL && !entry->valid)
+                       entry = NULL;
        }
 
-       return NULL;
+       return entry;
 }
 
 /*
@@ -171,7 +170,7 @@ static struct netlbl_dom_map *netlbl_domhsh_search_def(const char *domain)
  * values on error.
  *
  */
-int netlbl_domhsh_init(u32 size)
+int __init netlbl_domhsh_init(u32 size)
 {
        u32 iter;
        struct netlbl_domhsh_tbl *hsh_tbl;