[ofa-general] Re: [RFC PATCH 3/5] rdma/cma: simplify locking needed for serialization of callbacks

Or Gerlitz ogerlitz at voltaire.com
Tue May 27 09:37:44 PDT 2008


Sean Hefty wrote:
>> @@ -359,7 +358,7 @@ static int cma_disable_remove(struct rdm
>>
>> 	spin_lock_irqsave(&id_priv->lock, flags);
>> 	if (id_priv->state == state) {
>> -		atomic_inc(&id_priv->dev_remove);
>> +		mutex_lock(&id_priv->handler_mutex);
> This just tried to acquire a mutex while holding a spinlock.

I see. So can taking this spin lock be avoided here? I understand that 
spin lock came to protect the state check, correct?

Or.




More information about the general mailing list