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

From: Lai Jiangshan <[email-masked]>
Date: Tue, 21 Apr 2009 13:46:16 +0800

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.