On Mon, Jun 27, 2016 at 15:32 -0400, Ted Unangst wrote:
> Mike Belopuhov wrote:
> > On Thu, Jun 23, 2016 at 12:44 -0400, Ted Unangst wrote:
> > > Instead of using the old flags and tsleep style lock, switch to rwlock in
> > > sblock. That's what it's for. More legible, and as a bonus, MP safer.
> > >
> > 
> > RW_NOSLEEP returns EBUSY if it has to wait, however
> > old sblock macro would return EWOULDBLOCK (EAGAIN)
> > instead.  This error code is returned all the way
> > to write system call so you don't want to change
> > that.
> 
> indeed. i noticed that, but wasn't sure of the implications. i checked a few
> callers to see if it was directly handled, but not all the way up.
> i should have mentioned it. i've added
> 
>       if (error == EBUSY)
>               error = EWOULDBLOCK;
> 

Yep. LGTM.

Reply via email to