Index: i386/conf/LINT =================================================================== RCS file: /home/ncvs/src/sys/i386/conf/LINT,v retrieving revision 1.711 diff -u -r1.711 LINT --- i386/conf/LINT 2000/01/05 04:27:12 1.711 +++ i386/conf/LINT 2000/01/05 16:44:18 @@ -2215,11 +2215,11 @@ options CLK_USE_TSC_CALIBRATION options CLUSTERDEBUG options COMPAT_LINUX -options COMPAT_SVR4 +#options COMPAT_SVR4 options CPU_UPGRADE_HW_CACHE options DEBUG options DEBUG_LINUX -options DEBUG_SVR4 +#options DEBUG_SVR4 options DEBUG_VFS_LOCKS #options DISABLE_PSE options ENABLE_ALART Index: kern/vfs_subr.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_subr.c,v retrieving revision 1.241 diff -u -r1.241 vfs_subr.c --- kern/vfs_subr.c 2000/01/05 05:11:34 1.241 +++ kern/vfs_subr.c 2000/01/05 16:58:51 @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include @@ -2881,3 +2882,36 @@ return (1); } +void +NDFREE(ndp, flags) + struct nameidata *ndp; + const uint flags; +{ + if (!(flags & NDF_NO_FREE_PNBUF) && + (ndp->ni_cnd.cn_flags & HASBUF)) { + zfree(namei_zone, ndp->ni_cnd.cn_pnbuf); + ndp->ni_cnd.cn_flags &= ~HASBUF; + } + if (!(flags & NDF_NO_DVP_UNLOCK) && + (ndp->ni_cnd.cn_flags & LOCKPARENT) && + ndp->ni_dvp != ndp->ni_vp) + VOP_UNLOCK(ndp->ni_dvp, 0, ndp->ni_cnd.cn_proc); + if (!(flags & NDF_NO_DVP_RELE) && + (ndp->ni_cnd.cn_flags & (LOCKPARENT|WANTPARENT))) { + vrele(ndp->ni_dvp); + ndp->ni_dvp = NULL; + } + if (!(flags & NDF_NO_VP_UNLOCK) && + (ndp->ni_cnd.cn_flags & LOCKLEAF) && ndp->ni_vp) + VOP_UNLOCK(ndp->ni_vp, 0, ndp->ni_cnd.cn_proc); + if (!(flags & NDF_NO_VP_RELE) && + ndp->ni_vp) { + vrele(ndp->ni_vp); + ndp->ni_vp = NULL; + } + if (!(flags & NDF_NO_STARTDIR_RELE) && + (ndp->ni_cnd.cn_flags & SAVESTART)) { + vrele(ndp->ni_startdir); + ndp->ni_startdir = NULL; + } +} Index: sys/namei.h =================================================================== RCS file: /home/ncvs/src/sys/sys/namei.h,v retrieving revision 1.28 diff -u -r1.28 namei.h --- sys/namei.h 1999/12/29 04:24:45 1.28 +++ sys/namei.h 2000/01/05 16:35:24 @@ -171,42 +171,7 @@ #define NDF_NO_FREE_PNBUF 0x00000020 #define NDF_ONLY_PNBUF (~NDF_NO_FREE_PNBUF) -#define NDFREE(ndp, flags) do { \ - struct nameidata *_ndp = (ndp); \ - unsigned int _flags = (flags); \ - \ - if (!(_flags & NDF_NO_FREE_PNBUF) && \ - (_ndp->ni_cnd.cn_flags & HASBUF)) { \ - zfree(namei_zone, _ndp->ni_cnd.cn_pnbuf); \ - _ndp->ni_cnd.cn_flags &= ~HASBUF; \ - } \ - if (!(_flags & NDF_NO_DVP_UNLOCK) && \ - (_ndp->ni_cnd.cn_flags & LOCKPARENT) && \ - _ndp->ni_dvp != _ndp->ni_vp) \ - VOP_UNLOCK(_ndp->ni_dvp, 0, _ndp->ni_cnd.cn_proc); \ - if (!(_flags & NDF_NO_DVP_RELE) && \ - (_ndp->ni_cnd.cn_flags & (LOCKPARENT|WANTPARENT))) { \ - vrele(_ndp->ni_dvp); \ - _ndp->ni_dvp = NULL; \ - } \ - if (!(_flags & NDF_NO_VP_UNLOCK) && \ - (_ndp->ni_cnd.cn_flags & LOCKLEAF) && _ndp->ni_vp) \ - VOP_UNLOCK(_ndp->ni_vp, 0, _ndp->ni_cnd.cn_proc); \ - if (!(_flags & NDF_NO_VP_RELE) && \ - _ndp->ni_vp) { \ - vrele(_ndp->ni_vp); \ - _ndp->ni_vp = NULL; \ - } \ - if (!(_flags & NDF_NO_STARTDIR_RELE) && \ - (_ndp->ni_cnd.cn_flags & SAVESTART)) { \ - vrele(_ndp->ni_startdir); \ - _ndp->ni_startdir = NULL; \ - } \ -} while (0) - -#endif - -#ifdef _KERNEL +void NDFREE __P((struct nameidata *, const uint)); int namei __P((struct nameidata *ndp)); int lookup __P((struct nameidata *ndp));