summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/nfs_vfsops.c
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2003-11-22 02:21:49 +0000
committeralfred <alfred@FreeBSD.org>2003-11-22 02:21:49 +0000
commita5dc4dbeb8e0b6441dd96ff20dedbfab26711445 (patch)
treed25562b1277a5d3728ec70c624f0765ad7489560 /sys/nfsclient/nfs_vfsops.c
parent01495655d6f56175f06ef7111769b7a049a266af (diff)
downloadFreeBSD-src-a5dc4dbeb8e0b6441dd96ff20dedbfab26711445.zip
FreeBSD-src-a5dc4dbeb8e0b6441dd96ff20dedbfab26711445.tar.gz
Use function pointers to remove the depenancy cross dependancy on nfs4
and the nfs3 client. Also fix some bugs that happen to be causing crashes in both v3 and v4 introduced by the v4 import. Submitted by: Jim Rees <rees@umich.edu> Approved by: re
Diffstat (limited to 'sys/nfsclient/nfs_vfsops.c')
-rw-r--r--sys/nfsclient/nfs_vfsops.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c
index 7ee48ab..a6ddfbb 100644
--- a/sys/nfsclient/nfs_vfsops.c
+++ b/sys/nfsclient/nfs_vfsops.c
@@ -124,6 +124,15 @@ VFS_SET(nfs_vfsops, nfs, VFCF_NETWORK);
/* So that loader and kldload(2) can find us, wherever we are.. */
MODULE_VERSION(nfs, 1);
+static struct nfs_rpcops nfs_rpcops = {
+ nfs_readrpc,
+ nfs_writerpc,
+ nfs_writebp,
+ nfs_readlinkrpc,
+ nfs_invaldir,
+ nfs_commit,
+};
+
/*
* This structure must be filled in by a primary bootstrap or bootstrap
* server for a diskless/dataless machine. It is initialized below just
@@ -790,6 +799,7 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
/* Set up the sockets and per-host congestion */
nmp->nm_sotype = argp->sotype;
nmp->nm_soproto = argp->proto;
+ nmp->nm_rpcops = &nfs_rpcops;
nfs_decode_args(nmp, argp);
OpenPOWER on IntegriCloud