From 90305aa38b4af9c8fd255ef8f44f577c19ad79bc Mon Sep 17 00:00:00 2001 From: Rick Macklem Date: Mon, 3 Jan 2011 20:37:31 +0000 Subject: Fix the nlm so that it no longer depends on the regular nfs client and, as such, can be loaded for the experimental nfs client without the regular client. Reviewed by: jhb MFC after: 2 weeks --- sys/nlm/nlm_advlock.c | 8 +++----- sys/nlm/nlm_prot_impl.c | 1 - 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'sys/nlm') diff --git a/sys/nlm/nlm_advlock.c b/sys/nlm/nlm_advlock.c index b4edb4dd9628..416cd1dcef32 100644 --- a/sys/nlm/nlm_advlock.c +++ b/sys/nlm/nlm_advlock.c @@ -217,20 +217,18 @@ nlm_advlock_internal(struct vnode *vp, void *id, int op, struct flock *fl, ASSERT_VOP_LOCKED(vp, "nlm_advlock_1"); + nmp = VFSTONFS(vp->v_mount); /* * Push any pending writes to the server and flush our cache * so that if we are contending with another machine for a * file, we get whatever they wrote and vice-versa. */ if (op == F_SETLK || op == F_UNLCK) - nfs_vinvalbuf(vp, V_SAVE, td, 1); + nmp->nm_vinvalbuf(vp, V_SAVE, td, 1); - nmp = VFSTONFS(vp->v_mount); strcpy(servername, nmp->nm_hostname); - nmp->nm_getinfo(vp, fh.fh_bytes, &fhlen, &ss, &is_v3, &size); + nmp->nm_getinfo(vp, fh.fh_bytes, &fhlen, &ss, &is_v3, &size, &timo); sa = (struct sockaddr *) &ss; - timo.tv_sec = nmp->nm_timeo / NFS_HZ; - timo.tv_usec = (nmp->nm_timeo % NFS_HZ) * (1000000 / NFS_HZ); if (is_v3 != 0) vers = NLM_VERS4; else diff --git a/sys/nlm/nlm_prot_impl.c b/sys/nlm/nlm_prot_impl.c index ea4baca2722d..ff4de7121542 100644 --- a/sys/nlm/nlm_prot_impl.c +++ b/sys/nlm/nlm_prot_impl.c @@ -2430,6 +2430,5 @@ DECLARE_MODULE(nfslockd, nfslockd_mod, SI_SUB_VFS, SI_ORDER_ANY); /* So that loader and kldload(2) can find us, wherever we are.. */ MODULE_DEPEND(nfslockd, krpc, 1, 1, 1); -MODULE_DEPEND(nfslockd, nfs, 1, 1, 1); MODULE_DEPEND(nfslockd, nfslock, 1, 1, 1); MODULE_VERSION(nfslockd, 1); -- cgit v1.3