Remove VOP_LEASE and supporting functions. This hasn't been used since

the removal of NQNFS, but was left in in case it was required for NFSv4.
Since our new NFSv4 client and server can't use it for their
requirements, GC the old mechanism, as well as other unused lease-
related code and interfaces.

Due to its impact on kernel programming and binary interfaces, this
change should not be MFC'd.

Proposed by:    jeff
Reviewed by:    jeff
Discussed with: rmacklem, zach loafman @ isilon
This commit is contained in:
Robert Watson 2009-04-10 10:52:19 +00:00
parent 3f54086eba
commit 885868cd8f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=190888
22 changed files with 4 additions and 124 deletions

View File

@ -217,7 +217,6 @@ zfs_vn_rdwr(enum uio_rw rw, vnode_t *vp, caddr_t base, ssize_t len,
vfslocked = VFS_LOCK_GIANT(vp->v_mount);
if (rw == UIO_WRITE) {
ioflag = IO_SYNC;
VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE);
} else {
ioflag = IO_DIRECT;
}

View File

@ -4577,7 +4577,6 @@ vop_deleteextattr {
ZFS_EXIT(zfsvfs);
return (error);
}
VOP_LEASE(nd.ni_dvp, td, ap->a_cred, LEASE_WRITE);
error = VOP_REMOVE(nd.ni_dvp, vp, &nd.ni_cnd);
vput(nd.ni_dvp);
@ -4639,7 +4638,6 @@ vop_setextattr {
return (error);
}
VOP_LEASE(vp, td, ap->a_cred, LEASE_WRITE);
VATTR_NULL(&va);
va.va_size = 0;
error = VOP_SETATTR(vp, &va, ap->a_cred);

View File

@ -1549,7 +1549,6 @@ static struct vop_vector devfs_specops = {
.vop_create = VOP_PANIC,
.vop_fsync = devfs_fsync,
.vop_getattr = devfs_getattr,
.vop_lease = VOP_NULL,
.vop_link = VOP_PANIC,
.vop_mkdir = VOP_PANIC,
.vop_mknod = VOP_PANIC,

View File

@ -118,7 +118,6 @@ struct vop_vector fifo_specops = {
.vop_getattr = VOP_EBADF,
.vop_ioctl = fifo_ioctl,
.vop_kqfilter = fifo_kqfilter,
.vop_lease = VOP_NULL,
.vop_link = VOP_PANIC,
.vop_mkdir = VOP_PANIC,
.vop_mknod = VOP_PANIC,

View File

@ -805,10 +805,6 @@ unionfs_mkshadowdir(struct unionfs_mount *ump, struct vnode *udvp,
if ((error = vn_start_write(udvp, &mp, V_WAIT | PCATCH)))
goto unionfs_mkshadowdir_free_out;
if ((error = VOP_LEASE(udvp, td, cn.cn_cred, LEASE_WRITE))) {
vn_finished_write(mp);
goto unionfs_mkshadowdir_free_out;
}
unionfs_create_uppervattr_core(ump, &lva, &va, td);
error = VOP_MKDIR(udvp, &uvp, &cn, &va);
@ -874,8 +870,7 @@ unionfs_mkwhiteout(struct vnode *dvp, struct componentname *cnp,
if ((error = vn_start_write(dvp, &mp, V_WAIT | PCATCH)))
goto unionfs_mkwhiteout_free_out;
if (!(error = VOP_LEASE(dvp, td, td->td_ucred, LEASE_WRITE)))
error = VOP_WHITEOUT(dvp, &cn, CREATE);
error = VOP_WHITEOUT(dvp, &cn, CREATE);
vn_finished_write(mp);
@ -949,9 +944,6 @@ unionfs_vn_create_on_upper(struct vnode **vpp, struct vnode *udvp,
goto unionfs_vn_create_on_upper_free_out1;
}
if ((error = VOP_LEASE(udvp, td, cred, LEASE_WRITE)) != 0)
goto unionfs_vn_create_on_upper_free_out1;
if ((error = VOP_CREATE(udvp, &vp, &cn, uvap)) != 0)
goto unionfs_vn_create_on_upper_free_out1;
@ -999,10 +991,6 @@ unionfs_copyfile_core(struct vnode *lvp, struct vnode *uvp,
uio.uio_segflg = UIO_SYSSPACE;
uio.uio_offset = 0;
if ((error = VOP_LEASE(lvp, td, cred, LEASE_READ)) != 0)
return (error);
if ((error = VOP_LEASE(uvp, td, cred, LEASE_WRITE)) != 0)
return (error);
buf = malloc(MAXBSIZE, M_TEMP, M_WAITOK);
while (error == 0) {

View File

@ -901,27 +901,6 @@ unionfs_write(struct vop_write_args *ap)
return (error);
}
static int
unionfs_lease(struct vop_lease_args *ap)
{
int error;
struct unionfs_node *unp;
struct vnode *vp;
UNIONFS_INTERNAL_DEBUG("unionfs_lease: enter\n");
KASSERT_UNIONFS_VNODE(ap->a_vp);
unp = VTOUNIONFS(ap->a_vp);
vp = (unp->un_uppervp != NULLVP ? unp->un_uppervp : unp->un_lowervp);
error = VOP_LEASE(vp, ap->a_td, ap->a_cred, ap->a_flag);
UNIONFS_INTERNAL_DEBUG("unionfs_lease: lease (%d)\n", error);
return (error);
}
static int
unionfs_ioctl(struct vop_ioctl_args *ap)
{
@ -947,7 +926,7 @@ unionfs_ioctl(struct vop_ioctl_args *ap)
error = VOP_IOCTL(ovp, ap->a_command, ap->a_data, ap->a_fflag,
ap->a_cred, ap->a_td);
UNIONFS_INTERNAL_DEBUG("unionfs_ioctl: lease (%d)\n", error);
UNIONFS_INTERNAL_DEBUG("unionfs_ioctl: leave (%d)\n", error);
return (error);
}
@ -2461,7 +2440,6 @@ struct vop_vector unionfs_vnodeops = {
.vop_getwritemount = unionfs_getwritemount,
.vop_inactive = unionfs_inactive,
.vop_ioctl = unionfs_ioctl,
.vop_lease = unionfs_lease,
.vop_link = unionfs_link,
.vop_listextattr = unionfs_listextattr,
.vop_lock1 = unionfs_lock,

View File

@ -436,7 +436,6 @@ acct_process(struct thread *td)
* Write the accounting information to the file.
*/
vfslocked = VFS_LOCK_GIANT(acct_vp->v_mount);
VOP_LEASE(acct_vp, td, acct_cred, LEASE_WRITE);
ret = vn_rdwr(UIO_WRITE, acct_vp, (caddr_t)&acct, sizeof (acct),
(off_t)0, UIO_SYSSPACE, IO_APPEND|IO_UNIT, acct_cred, NOCRED,
(int *)0, td);

View File

@ -293,7 +293,6 @@ alq_doio(struct alq *alq)
vfslocked = VFS_LOCK_GIANT(vp->v_mount);
vn_start_write(vp, &mp, V_WAIT);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
VOP_LEASE(vp, td, alq->aq_cred, LEASE_WRITE);
/*
* XXX: VOP_WRITE error checks are ignored.
*/

View File

@ -992,7 +992,6 @@ ktr_writerequest(struct thread *td, struct ktr_request *req)
vfslocked = VFS_LOCK_GIANT(vp->v_mount);
vn_start_write(vp, &mp, V_WAIT);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
(void)VOP_LEASE(vp, td, cred, LEASE_WRITE);
#ifdef MAC
error = mac_vnode_check_write(cred, NOCRED, vp);
if (error == 0)

View File

@ -2984,7 +2984,6 @@ coredump(struct thread *td)
if (set_core_nodump_flag)
vattr.va_flags = UF_NODUMP;
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
VOP_LEASE(vp, td, cred, LEASE_WRITE);
VOP_SETATTR(vp, &vattr, cred);
VOP_UNLOCK(vp, 0);
vn_finished_write(mp);

View File

@ -74,7 +74,6 @@ static uma_zone_t itimer_zone = NULL;
static int settime(struct thread *, struct timeval *);
static void timevalfix(struct timeval *);
static void no_lease_updatetime(int);
static void itimer_start(void);
static int itimer_init(void *, int, int);
@ -106,14 +105,6 @@ int itimespecfix(struct timespec *ts);
SYSINIT(posix_timer, SI_SUB_P1003_1B, SI_ORDER_FIRST+4, itimer_start, NULL);
static void
no_lease_updatetime(deltat)
int deltat;
{
}
void (*lease_updatetime)(int) = no_lease_updatetime;
static int
settime(struct thread *td, struct timeval *tv)
{
@ -168,9 +159,6 @@ settime(struct thread *td, struct timeval *tv)
ts.tv_nsec = tv->tv_usec * 1000;
mtx_lock(&Giant);
tc_setclock(&ts);
(void) splsoftclock();
lease_updatetime(delta.tv_sec);
splx(s);
resettodr();
mtx_unlock(&Giant);
return (0);

View File

@ -457,10 +457,8 @@ uipc_bind(struct socket *so, struct sockaddr *nam, struct thread *td)
error = mac_vnode_check_create(td->td_ucred, nd.ni_dvp, &nd.ni_cnd,
&vattr);
#endif
if (error == 0) {
VOP_LEASE(nd.ni_dvp, td, td->td_ucred, LEASE_WRITE);
if (error == 0)
error = VOP_CREATE(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr);
}
NDFREE(&nd, NDF_ONLY_PNBUF);
vput(nd.ni_dvp);
if (error) {

View File

@ -91,7 +91,6 @@ vacl_set_acl(struct thread *td, struct vnode *vp, acl_type_t type,
error = vn_start_write(vp, &mp, V_WAIT | PCATCH);
if (error != 0)
return (error);
VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
#ifdef MAC
error = mac_vnode_check_setacl(td->td_ucred, vp, type, &inkernacl);
@ -117,7 +116,6 @@ vacl_get_acl(struct thread *td, struct vnode *vp, acl_type_t type,
struct acl inkernelacl;
int error;
VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
#ifdef MAC
error = mac_vnode_check_getacl(td->td_ucred, vp, type);
@ -146,7 +144,6 @@ vacl_delete(struct thread *td, struct vnode *vp, acl_type_t type)
error = vn_start_write(vp, &mp, V_WAIT | PCATCH);
if (error)
return (error);
VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
#ifdef MAC
error = mac_vnode_check_deleteacl(td->td_ucred, vp, type);

View File

@ -98,7 +98,6 @@ struct vop_vector default_vnodeops = {
.vop_ioctl = VOP_ENOTTY,
.vop_kqfilter = vop_stdkqfilter,
.vop_islocked = vop_stdislocked,
.vop_lease = VOP_NULL,
.vop_lock1 = vop_stdlock,
.vop_lookup = vop_nolookup,
.vop_open = VOP_NULL,

View File

@ -175,7 +175,6 @@ extattr_set_vp(struct vnode *vp, int attrnamespace, const char *attrname,
error = vn_start_write(vp, &mp, V_WAIT | PCATCH);
if (error)
return (error);
VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
aiov.iov_base = data;
@ -341,7 +340,6 @@ extattr_get_vp(struct vnode *vp, int attrnamespace, const char *attrname,
int error;
VFS_ASSERT_GIANT(vp->v_mount);
VOP_LEASE(vp, td, td->td_ucred, LEASE_READ);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
/*
@ -522,7 +520,6 @@ extattr_delete_vp(struct vnode *vp, int attrnamespace, const char *attrname,
error = vn_start_write(vp, &mp, V_WAIT | PCATCH);
if (error)
return (error);
VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
#ifdef MAC
@ -664,7 +661,6 @@ extattr_list_vp(struct vnode *vp, int attrnamespace, void *data,
int error;
VFS_ASSERT_GIANT(vp->v_mount);
VOP_LEASE(vp, td, td->td_ucred, LEASE_READ);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
auiop = NULL;

View File

@ -1161,7 +1161,6 @@ kern_openat(struct thread *td, int fd, char *path, enum uio_seg pathseg,
if (flags & O_TRUNC) {
if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0)
goto bad;
VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE);
VATTR_NULL(&vat);
vat.va_size = 0;
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
@ -1353,7 +1352,6 @@ kern_mknodat(struct thread *td, int fd, char *path, enum uio_seg pathseg,
&nd.ni_cnd, &vattr);
#endif
if (!error) {
VOP_LEASE(nd.ni_dvp, td, td->td_ucred, LEASE_WRITE);
if (whiteout)
error = VOP_WHITEOUT(nd.ni_dvp, &nd.ni_cnd, CREATE);
else {
@ -1460,7 +1458,6 @@ kern_mkfifoat(struct thread *td, int fd, char *path, enum uio_seg pathseg,
if (error)
goto out;
#endif
VOP_LEASE(nd.ni_dvp, td, td->td_ucred, LEASE_WRITE);
error = VOP_MKNOD(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr);
if (error == 0)
vput(nd.ni_vp);
@ -1606,8 +1603,6 @@ kern_linkat(struct thread *td, int fd1, int fd2, char *path1, char *path2,
error = EEXIST;
} else if ((error = vn_lock(vp, LK_EXCLUSIVE | LK_RETRY))
== 0) {
VOP_LEASE(nd.ni_dvp, td, td->td_ucred, LEASE_WRITE);
VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE);
error = can_hardlink(vp, td->td_ucred);
if (error == 0)
#ifdef MAC
@ -1727,7 +1722,6 @@ kern_symlinkat(struct thread *td, char *path1, int fd, char *path2,
if (error)
goto out2;
#endif
VOP_LEASE(nd.ni_dvp, td, td->td_ucred, LEASE_WRITE);
error = VOP_SYMLINK(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr, syspath);
if (error == 0)
vput(nd.ni_vp);
@ -1787,7 +1781,6 @@ undelete(td, uap)
return (error);
goto restart;
}
VOP_LEASE(nd.ni_dvp, td, td->td_ucred, LEASE_WRITE);
error = VOP_WHITEOUT(nd.ni_dvp, &nd.ni_cnd, DELETE);
NDFREE(&nd, NDF_ONLY_PNBUF);
vput(nd.ni_dvp);
@ -1893,7 +1886,6 @@ kern_unlinkat(struct thread *td, int fd, char *path, enum uio_seg pathseg)
if (error)
goto out;
#endif
VOP_LEASE(nd.ni_dvp, td, td->td_ucred, LEASE_WRITE);
error = VOP_REMOVE(nd.ni_dvp, vp, &nd.ni_cnd);
#ifdef MAC
out:
@ -2667,7 +2659,6 @@ setfflags(td, vp, flags)
if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0)
return (error);
VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
VATTR_NULL(&vattr);
vattr.va_flags = flags;
@ -2795,7 +2786,6 @@ setfmode(td, vp, mode)
if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0)
return (error);
VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
VATTR_NULL(&vattr);
vattr.va_mode = mode & ALLPERMS;
@ -2958,7 +2948,6 @@ setfown(td, vp, uid, gid)
if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0)
return (error);
VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
VATTR_NULL(&vattr);
vattr.va_uid = uid;
@ -3172,7 +3161,6 @@ setutimes(td, vp, ts, numtimes, nullflag)
if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0)
return (error);
VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
setbirthtime = 0;
if (numtimes < 3 && !VOP_GETATTR(vp, &vattr, td->td_ucred) &&
@ -3403,7 +3391,6 @@ kern_truncate(struct thread *td, char *path, enum uio_seg pathseg, off_t length)
return (error);
}
NDFREE(&nd, NDF_ONLY_PNBUF);
VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if (vp->v_type == VDIR)
error = EISDIR;
@ -3647,13 +3634,6 @@ kern_renameat(struct thread *td, int oldfd, char *old, int newfd, char *new,
#endif
out:
if (!error) {
VOP_LEASE(tdvp, td, td->td_ucred, LEASE_WRITE);
if (fromnd.ni_dvp != tdvp) {
VOP_LEASE(fromnd.ni_dvp, td, td->td_ucred, LEASE_WRITE);
}
if (tvp) {
VOP_LEASE(tvp, td, td->td_ucred, LEASE_WRITE);
}
error = VOP_RENAME(fromnd.ni_dvp, fromnd.ni_vp, &fromnd.ni_cnd,
tond.ni_dvp, tond.ni_vp, &tond.ni_cnd);
NDFREE(&fromnd, NDF_ONLY_PNBUF);
@ -3779,7 +3759,6 @@ kern_mkdirat(struct thread *td, int fd, char *path, enum uio_seg segflg,
if (error)
goto out;
#endif
VOP_LEASE(nd.ni_dvp, td, td->td_ucred, LEASE_WRITE);
error = VOP_MKDIR(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr);
#ifdef MAC
out:
@ -3872,8 +3851,6 @@ kern_rmdirat(struct thread *td, int fd, char *path, enum uio_seg pathseg)
return (error);
goto restart;
}
VOP_LEASE(nd.ni_dvp, td, td->td_ucred, LEASE_WRITE);
VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE);
error = VOP_RMDIR(nd.ni_dvp, nd.ni_vp, &nd.ni_cnd);
vn_finished_write(mp);
out:
@ -4462,7 +4439,6 @@ fhopen(td, uap)
vrele(vp);
goto out;
}
VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); /* XXX */
#ifdef MAC
/*

View File

@ -153,14 +153,10 @@ vn_open_cred(ndp, flagp, cmode, cred, fp)
#ifdef MAC
error = mac_vnode_check_create(cred, ndp->ni_dvp,
&ndp->ni_cnd, vap);
if (error == 0) {
if (error == 0)
#endif
VOP_LEASE(ndp->ni_dvp, td, cred, LEASE_WRITE);
error = VOP_CREATE(ndp->ni_dvp, &ndp->ni_vp,
&ndp->ni_cnd, vap);
#ifdef MAC
}
#endif
vput(ndp->ni_dvp);
vn_finished_write(mp);
if (error) {
@ -521,7 +517,6 @@ vn_read(fp, uio, active_cred, flags, td)
if (fp->f_flag & O_DIRECT)
ioflag |= IO_DIRECT;
vfslocked = VFS_LOCK_GIANT(vp->v_mount);
VOP_LEASE(vp, td, fp->f_cred, LEASE_READ);
/*
* According to McKusick the vn lock was protecting f_offset here.
* It is now protected by the FOFFSET_LOCKED flag.
@ -598,7 +593,6 @@ vn_write(fp, uio, active_cred, flags, td)
if (vp->v_type != VCHR &&
(error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0)
goto unlock;
VOP_LEASE(vp, td, fp->f_cred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if ((flags & FOF_OFFSET) == 0)
uio->uio_offset = fp->f_offset;
@ -642,7 +636,6 @@ vn_truncate(fp, length, active_cred, td)
VFS_UNLOCK_GIANT(vfslocked);
return (error);
}
VOP_LEASE(vp, td, active_cred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if (vp->v_type == VDIR) {
error = EISDIR;

View File

@ -199,16 +199,6 @@ vop_write {
};
%% lease vp = = =
vop_lease {
IN struct vnode *vp;
IN struct thread *td;
IN struct ucred *cred;
IN int flag;
};
%% ioctl vp U U U
vop_ioctl {

View File

@ -173,7 +173,6 @@ struct vop_vector nfs4_vnodeops = {
.vop_getpages = nfs_getpages,
.vop_putpages = nfs_putpages,
.vop_inactive = nfs_inactive,
.vop_lease = VOP_NULL,
.vop_link = nfs4_link,
.vop_lookup = nfs4_lookup,
.vop_mkdir = nfs4_mkdir,

View File

@ -168,7 +168,6 @@ struct vop_vector nfs_vnodeops = {
.vop_getpages = nfs_getpages,
.vop_putpages = nfs_putpages,
.vop_inactive = nfs_inactive,
.vop_lease = VOP_NULL,
.vop_link = nfs_link,
.vop_lookup = nfs_lookup,
.vop_mkdir = nfs_mkdir,

View File

@ -412,14 +412,6 @@ extern struct uma_zone *namei_zone;
extern int prtactive; /* nonzero to call vprint() */
extern struct vattr va_null; /* predefined null vattr structure */
/*
* Macro/function to check for client cache inconsistency w.r.t. leasing.
*/
#define LEASE_READ 0x1 /* Check lease for readers */
#define LEASE_WRITE 0x2 /* Check lease for modifiers */
extern void (*lease_updatetime)(int deltat);
#define VI_LOCK(vp) mtx_lock(&(vp)->v_interlock)
#define VI_LOCK_FLAGS(vp, flags) mtx_lock_flags(&(vp)->v_interlock, (flags))
#define VI_TRYLOCK(vp) mtx_trylock(&(vp)->v_interlock)
@ -587,8 +579,6 @@ struct uio;
struct vattr;
struct vnode;
extern int (*lease_check_hook)(struct vop_lease_args *);
/* cache_* may belong in namei.h. */
void cache_enter(struct vnode *dvp, struct vnode *vp,
struct componentname *cnp);
@ -607,7 +597,6 @@ int insmntque1(struct vnode *vp, struct mount *mp,
void (*dtr)(struct vnode *, void *), void *dtr_arg);
int insmntque(struct vnode *vp, struct mount *mp);
u_quad_t init_va_filerev(void);
int lease_check(struct vop_lease_args *ap);
int speedup_syncer(void);
#define textvp_fullpath(p, rb, rfb) \
vn_fullpath(FIRST_THREAD_IN_PROC(p), (p)->p_textvp, rb, rfb)

View File

@ -278,7 +278,6 @@ ffs_snapshot(mp, snapfile)
return (error);
goto restart;
}
VOP_LEASE(nd.ni_dvp, td, KERNCRED, LEASE_WRITE);
error = VOP_CREATE(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vat);
VOP_UNLOCK(nd.ni_dvp, 0);
if (error) {