summaryrefslogtreecommitdiffstats
path: root/sys/nfs
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>1999-09-07 22:42:38 +0000
committeralfred <alfred@FreeBSD.org>1999-09-07 22:42:38 +0000
commite16a3900a7835b58a16e19a58511db912f1081f8 (patch)
treef6801d0b7edc902d94f170cf5d4a357c90e1fdb6 /sys/nfs
parent16f9b4552c757be79df4ea6fa44b8be88902894b (diff)
downloadFreeBSD-src-e16a3900a7835b58a16e19a58511db912f1081f8.zip
FreeBSD-src-e16a3900a7835b58a16e19a58511db912f1081f8.tar.gz
All unimplemented VFS ops now have entries in kern/vfs_default.c that return
reasonable defaults. This avoids confusing and ugly casting to eopnotsupp or making dummy functions. Bogus casting of filesystem sysctls to eopnotsupp() have been removed. This should make *_vfsops.c more readable and reduce bloat. Reviewed by: msmith, eivind Approved by: phk Tested by: Jeroen Ruigrok/Asmodai <asmodai@wxs.nl>
Diffstat (limited to 'sys/nfs')
-rw-r--r--sys/nfs/nfs_vfsops.c94
1 files changed, 5 insertions, 89 deletions
diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c
index 3e90bdb..33085c4 100644
--- a/sys/nfs/nfs_vfsops.c
+++ b/sys/nfs/nfs_vfsops.c
@@ -99,38 +99,28 @@ static int mountnfs __P((struct nfs_args *,struct mount *,
struct sockaddr *,char *,char *,struct vnode **));
static int nfs_mount __P(( struct mount *mp, char *path, caddr_t data,
struct nameidata *ndp, struct proc *p));
-static int nfs_start __P(( struct mount *mp, int flags,
- struct proc *p));
static int nfs_unmount __P(( struct mount *mp, int mntflags,
struct proc *p));
static int nfs_root __P(( struct mount *mp, struct vnode **vpp));
-static int nfs_quotactl __P(( struct mount *mp, int cmds, uid_t uid,
- caddr_t arg, struct proc *p));
static int nfs_statfs __P(( struct mount *mp, struct statfs *sbp,
struct proc *p));
static int nfs_sync __P(( struct mount *mp, int waitfor,
struct ucred *cred, struct proc *p));
-static int nfs_vptofh __P(( struct vnode *vp, struct fid *fhp));
-static int nfs_fhtovp __P((struct mount *mp, struct fid *fhp,
- struct sockaddr *nam, struct vnode **vpp,
- int *exflagsp, struct ucred **credanonp));
-static int nfs_vget __P((struct mount *, ino_t, struct vnode **));
-
/*
* nfs vfs operations.
*/
static struct vfsops nfs_vfsops = {
nfs_mount,
- nfs_start,
+ vfs_stdstart,
nfs_unmount,
nfs_root,
- nfs_quotactl,
+ vfs_stdquotactl,
nfs_statfs,
nfs_sync,
- nfs_vget,
- nfs_fhtovp,
- nfs_vptofh,
+ vfs_stdvget,
+ vfs_stdfhtovp, /* shouldn't happen */
+ vfs_stdvptofh, /* shouldn't happen */
nfs_init,
nfs_uninit,
};
@@ -1078,77 +1068,3 @@ loop:
return (allerror);
}
-/*
- * NFS flat namespace lookup.
- * Currently unsupported.
- */
-/* ARGSUSED */
-static int
-nfs_vget(mp, ino, vpp)
- struct mount *mp;
- ino_t ino;
- struct vnode **vpp;
-{
-
- return (EOPNOTSUPP);
-}
-
-/*
- * At this point, this should never happen
- */
-/* ARGSUSED */
-static int
-nfs_fhtovp(mp, fhp, nam, vpp, exflagsp, credanonp)
- register struct mount *mp;
- struct fid *fhp;
- struct sockaddr *nam;
- struct vnode **vpp;
- int *exflagsp;
- struct ucred **credanonp;
-{
-
- return (EINVAL);
-}
-
-/*
- * Vnode pointer to File handle, should never happen either
- */
-/* ARGSUSED */
-static int
-nfs_vptofh(vp, fhp)
- struct vnode *vp;
- struct fid *fhp;
-{
-
- return (EINVAL);
-}
-
-/*
- * Vfs start routine, a no-op.
- */
-/* ARGSUSED */
-static int
-nfs_start(mp, flags, p)
- struct mount *mp;
- int flags;
- struct proc *p;
-{
-
- return (0);
-}
-
-/*
- * Do operations associated with quotas, not supported
- */
-/* ARGSUSED */
-static int
-nfs_quotactl(mp, cmd, uid, arg, p)
- struct mount *mp;
- int cmd;
- uid_t uid;
- caddr_t arg;
- struct proc *p;
-{
-
- return (EOPNOTSUPP);
-}
OpenPOWER on IntegriCloud