]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - lib/rhashtable.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[mirror_ubuntu-artful-kernel.git] / lib / rhashtable.c
index 172454e6b979e935ef0d184953b6c35b06c32592..c5b9b9351cec8acdf5fcdafaf88fc58562896391 100644 (file)
@@ -146,9 +146,7 @@ static void bucket_table_free(const struct bucket_table *tbl)
        if (tbl->nest)
                nested_bucket_table_free(tbl);
 
-       if (tbl)
-               kvfree(tbl->locks);
-
+       kvfree(tbl->locks);
        kvfree(tbl);
 }
 
@@ -1123,12 +1121,13 @@ struct rhash_head __rcu **rht_bucket_nested(const struct bucket_table *tbl,
        union nested_table *ntbl;
 
        ntbl = (union nested_table *)rcu_dereference_raw(tbl->buckets[0]);
-       ntbl = rht_dereference_bucket(ntbl[index].table, tbl, hash);
+       ntbl = rht_dereference_bucket_rcu(ntbl[index].table, tbl, hash);
        subhash >>= tbl->nest;
 
        while (ntbl && size > (1 << shift)) {
                index = subhash & ((1 << shift) - 1);
-               ntbl = rht_dereference_bucket(ntbl[index].table, tbl, hash);
+               ntbl = rht_dereference_bucket_rcu(ntbl[index].table,
+                                                 tbl, hash);
                size >>= shift;
                subhash >>= shift;
        }