Date: Wed, 22 Oct 1997 12:40:50 +1000 From: Bruce Evans <bde@zeta.org.au> To: current@FreeBSD.ORG, roberto@keltia.freenix.fr Subject: Re: nullfs & current UPDATE! Message-ID: <199710220240.MAA23169@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>Opinions about this ? > >Index: null_vnops.c >=================================================================== >RCS file: /spare/FreeBSD-current/src/sys/miscfs/nullfs/null_vnops.c,v >retrieving revision 1.24 >diff -u -2 -r1.24 null_vnops.c >--- null_vnops.c 1997/10/15 10:04:31 1.24 >+++ null_vnops.c 1997/10/21 18:31:52 >@@ -534,4 +534,7 @@ > } */ *ap; > { >+ struct vnode *vp = ap->a_vp; >+ struct null_node *xp = VTONULL(vp); >+ struct vnode *lowervp = xp->null_lowervp; style.9 says not to obfuscate code by initializes variables in declarations. > /* > * Do nothing (and _don't_ bypass). It doesn't do nothing, especially now. >@@ -546,4 +549,5 @@ > * That's too much work for now. > */ >+ VOP_INACTIVE(lowervp, ap->a_p); > VOP_UNLOCK(ap->a_vp, 0, ap->a_p); It is an obfuscation to set ap->a_vp = vp above and then not use it here. I think the function is still simple enough for it to be clearer without temporary variables. `lowervp' can be written fairly concisely as VTONULL(ap->a_vp)->null_lowervp. In fact, there is already a macro NULLVPTOLOWERVP() for this. It seems to be used consistently to set `lowervp' variables that are passed to other functions and not used again, as lowervp is here. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710220240.MAA23169>