Re: [PATCH RESEND v2 1/1] percpu_rw_semaphore: reimplement to notblock the readers unnecessarily

From: Oleg Nesterov
Date: Fri Nov 09 2012 - 13:19:05 EST


On 11/09, Oleg Nesterov wrote:
>
> static bool xxx(brw)
> {
> down_write(&brw->rw_sem);
> if (!atomic_read(&brw->slow_read_ctr))
> return true;

I meant, try_to_down_write(). Otherwise this can obviously deadlock.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/