for (i = 0; i < n_buckets >> TBL_L1_BITS; i++) {
l1[i] = (struct tbl_bucket **)get_zeroed_page(GFP_KERNEL);
if (!l1[i]) {
- free_buckets(l1, i << TBL_L1_BITS, 0);
+ free_buckets(l1, i << TBL_L1_BITS, NULL);
return NULL;
}
}
int i;
for (i = 0; i < bucket->n_objs; i++) {
- struct tbl_node *obj = rcu_dereference(bucket->objs[i]);
+ struct tbl_node *obj = bucket->objs[i];
if (obj->hash == hash && likely(cmp(obj, target)))
return i;
}
int tbl_insert(struct tbl *table, struct tbl_node *target, u32 hash)
{
struct tbl_bucket **oldp = find_bucket(table, hash);
- struct tbl_bucket *old = *rcu_dereference(oldp);
+ struct tbl_bucket *old = rcu_dereference(*oldp);
unsigned int n = old ? old->n_objs : 0;
struct tbl_bucket *new = bucket_alloc(n + 1);
int tbl_remove(struct tbl *table, struct tbl_node *target)
{
struct tbl_bucket **oldp = find_bucket(table, target->hash);
- struct tbl_bucket *old = *rcu_dereference(oldp);
+ struct tbl_bucket *old = rcu_dereference(*oldp);
unsigned int n = old->n_objs;
struct tbl_bucket *new;