Re: 2.6.7-mm7

Andrew Morton
2004-07-09T18:55:31Z

Jesse Stockall <stockall@magma.ca> wrote:
>
> + *
> + * Unfortunately we have to use a separate wait queue, because we need
> + * to make sure that a thread waiting for a writelock won't block other
> + * threads from acquiring a readlock.
> */
> void usb_lock_all_devices(void)
> {
> - down_write(&usb_all_devices_rwsem);
> + wait_event(usb_all_devices_wqh,
> + down_write_trylock(&usb_all_devices_rwsem));

That's a bit unusual. Could you (or Alan) please explain the reason for
this a little more?