#include <afsconfig.h>
#include "afs/param.h"
-RCSID
- ("$Header$");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afs/afsincludes.h" /* Afs-based standard headers */
/* from /usr/src/sys/kern/vfs_subr.c */
extern void insmntque(struct vnode *, struct mount *);
-extern int sys_lkmnosys(), afs3_syscall(), afs_xioctl(), Afs_xsetgroups();
+extern int sys_lkmnosys(), afs_xioctl(), Afs_xsetgroups();
static int lkmid = -1;
static int afs_badcall(struct proc *p, void *xx, register_t * yy);
};
int
-afs_nbsd_lookupname(char *fnamep, enum uio_seg segflg, int followlink,
- struct vnode **dirvpp, struct vnode **compvpp)
+afs_obsd_lookupname(char *fnamep, enum uio_seg segflg, int followlink,
+ struct vnode **compvpp)
{
struct nameidata nd;
int niflag;
int error;
/*
- * Lookup pathname "fnamep", returning parent directory in
- * *dirvpp (if non-null) and leaf in *compvpp. segflg says whether the
- * pathname is user or system space.
+ * Lookup pathname "fnamep", returning leaf in *compvpp. segflg says
+ * whether the pathname is user or system space.
*/
/* XXX LOCKLEAF ? */
niflag = followlink ? FOLLOW : NOFOLLOW;
- if (dirvpp)
- niflag |= WANTPARENT; /* XXX LOCKPARENT? */
NDINIT(&nd, LOOKUP, niflag, segflg, fnamep, osi_curproc());
if ((error = namei(&nd)))
return error;
*compvpp = nd.ni_vp;
- if (dirvpp)
- *dirvpp = nd.ni_dvp;
return error;
}
{
extern int sys_ioctl(), sys_setgroups();
+ struct vnode *vp;
+
+ for (vp = LIST_FIRST(&afsp->mnt_vnodelist); vp != NULL;
+ vp = LIST_NEXT(vp, v_mntvnodes)) {
+ if (vp->v_usecount) return EBUSY;
+ }
+
AFS_STATCNT(afs_unmount);
#ifdef AFS_DISCON_ENV
give_up_cbs();
}
void
-afs_nbsd_getnewvnode(struct vcache *tvc)
+afs_obsd_getnewvnode(struct vcache *tvc)
{
while (getnewvnode(VT_AFS, afs_globalVFS, afs_vnodeop_p, &tvc->v)) {
/* no vnodes available, force an alloc (limits be damned)! */
AFS_RELE(AFSTOV(afs_globalVp));
#endif
afs_globalVp = tvp;
- VREF(AFSTOV(afs_globalVp));
+ vref(AFSTOV(afs_globalVp));
}
AFSTOV(tvp)->v_flag |= VROOT;
afs_globalVFS = mp;