diff options
author | eivind <eivind@FreeBSD.org> | 1999-12-15 23:02:35 +0000 |
---|---|---|
committer | eivind <eivind@FreeBSD.org> | 1999-12-15 23:02:35 +0000 |
commit | 87724eb67358c0993676ad3dfe9091e192a653f4 (patch) | |
tree | c4e987197c199433e822f5a66858564ad5ccd4dd /sys/geom | |
parent | 529bc073c0dba1aaccc98818ee299b79a111afab (diff) | |
download | FreeBSD-src-87724eb67358c0993676ad3dfe9091e192a653f4.zip FreeBSD-src-87724eb67358c0993676ad3dfe9091e192a653f4.tar.gz |
Introduce NDFREE (and remove VOP_ABORTOP)
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/geom_ccd.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/sys/geom/geom_ccd.c b/sys/geom/geom_ccd.c index 7f14c78..b70f8c2 100644 --- a/sys/geom/geom_ccd.c +++ b/sys/geom/geom_ccd.c @@ -109,6 +109,8 @@ #include <sys/ccdvar.h> +#include <vm/vm_zone.h> + #if defined(CCDDEBUG) && !defined(DEBUG) #define DEBUG #endif @@ -1598,15 +1600,13 @@ ccdlookup(path, p, vpp) vp = nd.ni_vp; if (vp->v_usecount > 1) { - VOP_UNLOCK(vp, 0, p); - (void)vn_close(vp, FREAD|FWRITE, p->p_ucred, p); - return (EBUSY); + error = EBUSY; + goto bad; } if (!vn_isdisk(vp)) { - VOP_UNLOCK(vp, 0, p); - (void)vn_close(vp, FREAD|FWRITE, p->p_ucred, p); - return (ENOTBLK); + error = ENOTBLK; + goto bad; } #ifdef DEBUG @@ -1615,8 +1615,15 @@ ccdlookup(path, p, vpp) #endif VOP_UNLOCK(vp, 0, p); + NDFREE(&nd, NDF_ONLY_PNBUF); *vpp = vp; return (0); +bad: + VOP_UNLOCK(vp, 0, p); + NDFREE(&nd, NDF_ONLY_PNBUF); + /* vn_close does vrele() for vp */ + (void)vn_close(vp, FREAD|FWRITE, p->p_ucred, p); + return (error); } /* |