From owner-freebsd-current Tue Oct 21 19:41:20 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id TAA28285 for current-outgoing; Tue, 21 Oct 1997 19:41:20 -0700 (PDT) (envelope-from owner-freebsd-current) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id TAA28280 for ; Tue, 21 Oct 1997 19:41:17 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.6.9) id MAA23169; Wed, 22 Oct 1997 12:40:50 +1000 Date: Wed, 22 Oct 1997 12:40:50 +1000 From: Bruce Evans Message-Id: <199710220240.MAA23169@godzilla.zeta.org.au> To: current@FreeBSD.ORG, roberto@keltia.freenix.fr Subject: Re: nullfs & current UPDATE! Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >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