]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - lib/rhashtable.c
scripts/checkstack.pl: dynamic stack growth for aarch64
[linux.git] / lib / rhashtable.c
index 30526afa8343124f06f0649592ee246dc4d88fbe..852ffa5160f1ac0bf538d27363861b2cabdaae45 100644 (file)
@@ -1179,8 +1179,7 @@ struct rhash_head __rcu **rht_bucket_nested(const struct bucket_table *tbl,
                                            unsigned int hash)
 {
        const unsigned int shift = PAGE_SHIFT - ilog2(sizeof(void *));
-       static struct rhash_head __rcu *rhnull =
-               (struct rhash_head __rcu *)NULLS_MARKER(0);
+       static struct rhash_head __rcu *rhnull;
        unsigned int index = hash & ((1 << tbl->nest) - 1);
        unsigned int size = tbl->size >> tbl->nest;
        unsigned int subhash = hash;
@@ -1198,8 +1197,11 @@ struct rhash_head __rcu **rht_bucket_nested(const struct bucket_table *tbl,
                subhash >>= shift;
        }
 
-       if (!ntbl)
+       if (!ntbl) {
+               if (!rhnull)
+                       INIT_RHT_NULLS_HEAD(rhnull);
                return &rhnull;
+       }
 
        return &ntbl[subhash].bucket;