diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2010-10-19 00:20:00 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2010-10-19 00:20:00 +0000 |
commit | 4cbec41fe48ec04d799dae677c7c44d5a703e182 (patch) | |
tree | 58fc2b105e6e1fb43a4b74746fd54253f3f2102d /sys/fs/nfsclient/nfs_clnode.c | |
parent | 4393b7cb7eaacda209dfdb075d90146991a14617 (diff) | |
download | FreeBSD-src-4cbec41fe48ec04d799dae677c7c44d5a703e182.zip FreeBSD-src-4cbec41fe48ec04d799dae677c7c44d5a703e182.tar.gz |
Modify the NFS clients and the NLM so that the NLM can be used
by both clients. Since the NLM uses various fields of the
nfsmount structure, those fields were extracted and put in a
separate nfs_mountcommon structure stored in sys/nfs/nfs_mountcommon.h.
This structure also has a function pointer for a function that
extracts the required information from the mount point and nfs vnode
for that particular client, for information stored differently by the
clients.
Reviewed by: jhb
MFC after: 2 weeks
Diffstat (limited to 'sys/fs/nfsclient/nfs_clnode.c')
-rw-r--r-- | sys/fs/nfsclient/nfs_clnode.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/fs/nfsclient/nfs_clnode.c b/sys/fs/nfsclient/nfs_clnode.c index 7d76be0..8ca1c43 100644 --- a/sys/fs/nfsclient/nfs_clnode.c +++ b/sys/fs/nfsclient/nfs_clnode.c @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/systm.h> +#include <sys/fcntl.h> #include <sys/lock.h> #include <sys/malloc.h> #include <sys/mount.h> @@ -53,12 +54,13 @@ __FBSDID("$FreeBSD$"); #include <fs/nfsclient/nfsmount.h> #include <fs/nfsclient/nfs.h> +#include <nfs/nfs_lock.h> + extern struct vop_vector newnfs_vnodeops; extern struct buf_ops buf_ops_newnfs; MALLOC_DECLARE(M_NEWNFSREQ); uma_zone_t newnfsnode_zone; -vop_reclaim_t *ncl_reclaim_p = NULL; void ncl_nhinit(void) @@ -238,8 +240,8 @@ ncl_reclaim(struct vop_reclaim_args *ap) * If the NLM is running, give it a chance to abort pending * locks. */ - if (ncl_reclaim_p) - ncl_reclaim_p(ap); + if (nfs_reclaim_p != NULL) + nfs_reclaim_p(ap); /* * Destroy the vm object and flush associated pages. |