summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/nfs_node.c
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2002-04-27 22:10:16 +0000
committeriedowse <iedowse@FreeBSD.org>2002-04-27 22:10:16 +0000
commitbae478cc81a5cbd5e18016c3f06d8687ff2dc748 (patch)
tree7a3673c36cfa38b1f2d63c72f3b2e4bb62f36a4a /sys/nfsclient/nfs_node.c
parentd8a09549094e7bab0e8a6c6fe6d06654c3c57387 (diff)
downloadFreeBSD-src-bae478cc81a5cbd5e18016c3f06d8687ff2dc748.zip
FreeBSD-src-bae478cc81a5cbd5e18016c3f06d8687ff2dc748.tar.gz
Remove the nfs_{lock,unlock,islocked} functions and the associated
definitions; they have been unused and #if 0'd out since the Lite/2 merge and we are unlikely to want them in the future.
Diffstat (limited to 'sys/nfsclient/nfs_node.c')
-rw-r--r--sys/nfsclient/nfs_node.c86
1 files changed, 0 insertions, 86 deletions
diff --git a/sys/nfsclient/nfs_node.c b/sys/nfsclient/nfs_node.c
index e3d8170..d8aa81a 100644
--- a/sys/nfsclient/nfs_node.c
+++ b/sys/nfsclient/nfs_node.c
@@ -357,89 +357,3 @@ nfs_reclaim(struct vop_reclaim_args *ap)
vp->v_data = (void *)0;
return (0);
}
-
-#if 0
-/*
- * Lock an nfsnode
- */
-int
-nfs_lock(struct vop_lock_args *ap)
-{
- struct vnode *vp = ap->a_vp;
-
- /*
- * Ugh, another place where interruptible mounts will get hung.
- * If you make this sleep interruptible, then you have to fix all
- * the VOP_LOCK() calls to expect interruptibility.
- */
- while (vp->v_flag & VXLOCK) {
- vp->v_flag |= VXWANT;
- (void) tsleep((caddr_t)vp, PINOD, "nfslck", 0);
- }
- if (vp->v_tag == VT_NON)
- return (ENOENT);
-
-#if 0
- /*
- * Only lock regular files. If a server crashed while we were
- * holding a directory lock, we could easily end up sleeping
- * until the server rebooted while holding a lock on the root.
- * Locks are only needed for protecting critical sections in
- * VMIO at the moment.
- * New vnodes will have type VNON but they should be locked
- * since they may become VREG. This is checked in loadattrcache
- * and unwanted locks are released there.
- */
- if (vp->v_type == VREG || vp->v_type == VNON) {
- while (np->n_flag & NLOCKED) {
- np->n_flag |= NWANTED;
- (void) tsleep((caddr_t) np, PINOD, "nfslck2", 0);
- /*
- * If the vnode has transmuted into a VDIR while we
- * were asleep, then skip the lock.
- */
- if (vp->v_type != VREG && vp->v_type != VNON)
- return (0);
- }
- np->n_flag |= NLOCKED;
- }
-#endif
-
- return (0);
-}
-
-/*
- * Unlock an nfsnode
- */
-int
-nfs_unlock(struct vop_unlock_args *ap)
-{
-#if 0
- struct vnode* vp = ap->a_vp;
- struct nfsnode* np = VTONFS(vp);
-
- if (vp->v_type == VREG || vp->v_type == VNON) {
- if (!(np->n_flag & NLOCKED))
- panic("nfs_unlock: nfsnode not locked");
- np->n_flag &= ~NLOCKED;
- if (np->n_flag & NWANTED) {
- np->n_flag &= ~NWANTED;
- wakeup((caddr_t) np);
- }
- }
-#endif
-
- return (0);
-}
-
-/*
- * Check for a locked nfsnode
- */
-int
-nfs_islocked(struct vop_islocked_args *ap)
-{
-
- return VTONFS(ap->a_vp)->n_flag & NLOCKED ? 1 : 0;
-}
-#endif
-
OpenPOWER on IntegriCloud