svn commit: r313495 - head/sys/kern

Alexey Dokuchaev danfe at FreeBSD.org
Sun Apr 9 16:01:01 UTC 2017


On Thu, Feb 09, 2017 at 09:21:42PM -0800, Cy Schubert wrote:
> In message <201702092335.v19NZvSQ026869 at repo.freebsd.org>, Konstantin
> Belousov writes:
> > New Revision: 313495
> > URL: https://svnweb.freebsd.org/changeset/base/313495
> > 
> > Log:
> >   ...
> >   Restructure the block in vn_open_vnode() which handles O_EXLOCK and
> >   O_SHLOCK open flags to make it easier to quit its execution earlier
> >   with an error.
> 
> This broke dhclient. I've attached typescript output at the end of this
> email.
> 
> > @@ -376,20 +384,20 @@ vn_open_vnode(struct vnode *vp, int fmod
> >  		 * Ensure the vnode is still able to be opened for
> >  		 * writing after the lock has been obtained.
> >  		 */
> > -		if (error == 0 && accmode & VWRITE)
> > +		if ((accmode & VWRITE) != 0)
> >  			error = vn_writechk(vp);
> > +		break;
> > +	}

Could it be related to this hunk?  It unconditionally breaks out of the
loop now (missing { } in that `if')?  PVS-Studio trips at here:

/usr/src/sys/kern/vfs_vnops.c:389:1: warning: V612 An unconditional 'break'
within a loop.

./danfe


More information about the svn-src-head mailing list