diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-04-10 10:52:19 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-04-10 10:52:19 +0000 |
commit | fba90f2e037dd422279bc69cd0265942148c0022 (patch) | |
tree | 60ec81c960bc903ee02261b0b6fa507c405c3d75 /sys/fs/unionfs | |
parent | a5ecda6fd6358d3ff6a18998f98482335fb6c884 (diff) | |
download | FreeBSD-src-fba90f2e037dd422279bc69cd0265942148c0022.zip FreeBSD-src-fba90f2e037dd422279bc69cd0265942148c0022.tar.gz |
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
Diffstat (limited to 'sys/fs/unionfs')
-rw-r--r-- | sys/fs/unionfs/union_subr.c | 14 | ||||
-rw-r--r-- | sys/fs/unionfs/union_vnops.c | 24 |
2 files changed, 2 insertions, 36 deletions
diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c index beaef2f..69165e3 100644 --- a/sys/fs/unionfs/union_subr.c +++ b/sys/fs/unionfs/union_subr.c @@ -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) { diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index d16851d..8505cac 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -902,27 +902,6 @@ unionfs_write(struct vop_write_args *ap) } 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) { int error; @@ -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, |