diff --git a/kernel/bpf/hashtab.c b/kernel/bpf/hashtab.c index b14b87463ee0..c2e0b26c8053 100644 --- a/kernel/bpf/hashtab.c +++ b/kernel/bpf/hashtab.c @@ -78,7 +78,7 @@ */ struct bucket { struct hlist_nulls_head head; - raw_spinlock_t raw_lock; + spinlock_t lock; }; #define HASHTAB_MAP_LOCK_COUNT 8 @@ -140,8 +140,8 @@ static void htab_init_buckets(struct bpf_htab *htab) for (i = 0; i < htab->n_buckets; i++) { INIT_HLIST_NULLS_HEAD(&htab->buckets[i].head, i); - raw_spin_lock_init(&htab->buckets[i].raw_lock); - lockdep_set_class(&htab->buckets[i].raw_lock, + spin_lock_init(&htab->buckets[i].lock); + lockdep_set_class(&htab->buckets[i].lock, &htab->lockdep_key); cond_resched(); } @@ -164,7 +164,7 @@ static inline int htab_lock_bucket(const struct bpf_htab *htab, return -EBUSY; } - raw_spin_lock(&b->raw_lock); + spin_lock(&b->lock); *pflags = flags; return 0; @@ -175,7 +175,7 @@ static inline void htab_unlock_bucket(const struct bpf_htab *htab, unsigned long flags) { hash = hash & min_t(u32, HASHTAB_MAP_LOCK_MASK, htab->n_buckets - 1); - raw_spin_unlock(&b->raw_lock); + spin_unlock(&b->lock); __this_cpu_dec(*(htab->map_locked[hash])); local_irq_restore(flags); preempt_enable();