Re: [PATCH] netfilter: use per-cpu recursive lock (v11)

Lai Jiangshan
2009-04-21T05:49:14Z

My silly opinion about lockdep in this patch:

> +
> +struct xt_info_lock {
> + spinlock_t lock;

+ struct lock_class_key key;

> + int depth; /* # readers - 1 */
> +};
> +static DEFINE_PER_CPU(struct xt_info_lock, xt_info_locks);
> +
> +
> +static inline void xt_info_lock_init(struct xt_info_lock *lock)
> +{
> + spin_lock_init(&lock->lock);

+ lockdep_set_class(&lock->lock, &lock->key);

> + lock->depth = -1;
> +}
> +

And remove lockdep_xxx()s.