svn commit: r312600 - head/sys/kern

Mateusz Guzik mjguzik at gmail.com
Sat Jan 21 21:36:22 UTC 2017


On Sat, Jan 21, 2017 at 09:51:14PM +0200, Konstantin Belousov wrote:
> On Sat, Jan 21, 2017 at 06:38:17PM +0000, Mateusz Guzik wrote:
> > +	if (flags & LK_RETRY) {
> Stylish test is
> 	if ((flags & LK_RETRY) != 0) {
> > +		if ((error != 0))
> Too many ().
> 
> > +			goto retry;
> > +		if ((vp->v_iflag & VI_DOOMED)) {
> Too many braces again, or missed != 0.

This was a side effect of putting these into __predict_false and then
removing it, albeit not fully.

> >  			VOP_UNLOCK(vp, 0);
> >  			error = ENOENT;
> > -			break;
> Also, this does the functional change, it seems to completely break LK_RERY
> logic.  If LK_RETRY is specified, VI_DOOMED must not result in ENOENT.
> 

Yea, this was a weird-ass brainfart on my part. Fixed in r312606

The gist of the actual change I wanted to make is postponing the read
from the vnode.

> >  		}
> > -	} while (flags & LK_RETRY && error != 0);
> > +	}
> >  	return (error);
> >  }
> >  


-- 
Mateusz Guzik <mjguzik gmail.com>


More information about the svn-src-head mailing list