Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Jan 2017 22:36:15 +0100
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        Mateusz Guzik <mjg@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r312600 - head/sys/kern
Message-ID:  <20170121213614.GB20930@dft-labs.eu>
In-Reply-To: <20170121195114.GA2349@kib.kiev.ua>
References:  <201701211838.v0LIcHIv072626@repo.freebsd.org> <20170121195114.GA2349@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
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>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170121213614.GB20930>