summaryrefslogtreecommitdiffstats
path: root/sys/nfs4client
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-12-01 20:18:56 +0000
committerphk <phk@FreeBSD.org>2004-12-01 20:18:56 +0000
commitcb64ed501e0d0c8c5a158f1d6c34594044720813 (patch)
treeb94ab59eb5eee1492ebc2056e72d07e3d1c86dda /sys/nfs4client
parentd0b255209880cf4efbcefdc83e20a3107f97e18b (diff)
downloadFreeBSD-src-cb64ed501e0d0c8c5a158f1d6c34594044720813.zip
FreeBSD-src-cb64ed501e0d0c8c5a158f1d6c34594044720813.tar.gz
Remove redundant functions (repo-copied from nfsclient) for dealing with
fifos.
Diffstat (limited to 'sys/nfs4client')
-rw-r--r--sys/nfs4client/nfs4_vnops.c114
1 files changed, 0 insertions, 114 deletions
diff --git a/sys/nfs4client/nfs4_vnops.c b/sys/nfs4client/nfs4_vnops.c
index 2d03bf5..22698d9 100644
--- a/sys/nfs4client/nfs4_vnops.c
+++ b/sys/nfs4client/nfs4_vnops.c
@@ -126,12 +126,6 @@ __FBSDID("$FreeBSD$");
#define vfs_busy_pages(bp, f)
#endif
-#if 0
-static vop_read_t nfsfifo_read;
-static vop_write_t nfsfifo_write;
-static vop_close_t nfsfifo_close;
-static vop_access_t nfsspec_access;
-#endif
static int nfs4_flush(struct vnode *, struct ucred *, int, struct thread *,
int);
static int nfs4_setattrrpc(struct vnode *, struct vattr *, struct ucred *,
@@ -2974,114 +2968,6 @@ nfs4_writebp(struct buf *bp, int force __unused, struct thread *td)
return (0);
}
-#if 0
-/*
- * nfs special file access vnode op.
- * Essentially just get vattr and then imitate iaccess() since the device is
- * local to the client.
- */
-static int
-nfsspec_access(struct vop_access_args *ap)
-{
- struct vattr *vap;
- struct ucred *cred = ap->a_cred;
- struct vnode *vp = ap->a_vp;
- mode_t mode = ap->a_mode;
- struct vattr vattr;
- int error;
-
- /*
- * Disallow write attempts on filesystems mounted read-only;
- * unless the file is a socket, fifo, or a block or character
- * device resident on the filesystem.
- */
- if ((mode & VWRITE) && (vp->v_mount->mnt_flag & MNT_RDONLY)) {
- switch (vp->v_type) {
- case VREG:
- case VDIR:
- case VLNK:
- return (EROFS);
- default:
- break;
- }
- }
- vap = &vattr;
- error = VOP_GETATTR(vp, vap, cred, ap->a_td);
- if (error)
- return (error);
- return (vaccess(vp->v_type, vap->va_mode, vap->va_uid, vap->va_gid,
- mode, cred, NULL));
-}
-
-/*
- * Read wrapper for fifos.
- */
-static int
-nfsfifo_read(struct vop_read_args *ap)
-{
- struct nfsnode *np = VTONFS(ap->a_vp);
-
- /*
- * Set access flag.
- */
- np->n_flag |= NACC;
- getnanotime(&np->n_atim);
- return (VOCALL(fifo_vnodeop_p, VOFFSET(vop_read), ap));
-}
-
-/*
- * Write wrapper for fifos.
- */
-static int
-nfsfifo_write(struct vop_write_args *ap)
-{
- struct nfsnode *np = VTONFS(ap->a_vp);
-
- /*
- * Set update flag.
- */
- np->n_flag |= NUPD;
- getnanotime(&np->n_mtim);
- return (VOCALL(fifo_vnodeop_p, VOFFSET(vop_write), ap));
-}
-
-/*
- * Close wrapper for fifos.
- *
- * Update the times on the nfsnode then do fifo close.
- */
-static int
-nfsfifo_close(struct vop_close_args *ap)
-{
- struct vnode *vp = ap->a_vp;
- struct nfsnode *np = VTONFS(vp);
- struct vattr vattr;
- struct timespec ts;
-
- if (np->n_flag & (NACC | NUPD)) {
- getnanotime(&ts);
- if (np->n_flag & NACC)
- np->n_atim = ts;
- if (np->n_flag & NUPD)
- np->n_mtim = ts;
- np->n_flag |= NCHG;
- if (vrefcnt(vp) == 1 &&
- (vp->v_mount->mnt_flag & MNT_RDONLY) == 0) {
- VATTR_NULL(&vattr);
- if (np->n_flag & NACC)
- vattr.va_atime = np->n_atim;
- if (np->n_flag & NUPD)
- vattr.va_mtime = np->n_mtim;
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, ap->a_td);
- (void)VOP_SETATTR(vp, &vattr, ap->a_cred, ap->a_td);
- VOP_UNLOCK(vp, 0, ap->a_td);
- }
- }
- return (VOCALL(fifo_vnodeop_p, VOFFSET(vop_close), ap));
-}
-
-#endif
-
/*
* Just call nfs_writebp() with the force argument set to 1.
*
OpenPOWER on IntegriCloud