summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/nfs_nfsiod.c
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2001-04-17 20:45:23 +0000
committeralfred <alfred@FreeBSD.org>2001-04-17 20:45:23 +0000
commitf0669d6c9e71dffa3f4104a202e3e1046c64021c (patch)
tree397489679b0ebce3143827e9a1702a14829f93a7 /sys/nfsclient/nfs_nfsiod.c
parent676302e684a39f23d1e6c16f7fea4855deb723a4 (diff)
downloadFreeBSD-src-f0669d6c9e71dffa3f4104a202e3e1046c64021c.zip
FreeBSD-src-f0669d6c9e71dffa3f4104a202e3e1046c64021c.tar.gz
Implement client side NFS locks.
Obtained from: BSD/os Import Ok'd by: mckusick, jkh, motd on builder.freebsd.org
Diffstat (limited to 'sys/nfsclient/nfs_nfsiod.c')
-rw-r--r--sys/nfsclient/nfs_nfsiod.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/nfsclient/nfs_nfsiod.c b/sys/nfsclient/nfs_nfsiod.c
index 2d46568..a47d5a8 100644
--- a/sys/nfsclient/nfs_nfsiod.c
+++ b/sys/nfsclient/nfs_nfsiod.c
@@ -56,6 +56,8 @@
#include <sys/domain.h>
#include <sys/protosw.h>
#include <sys/namei.h>
+#include <sys/fcntl.h>
+#include <sys/lockf.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
@@ -69,6 +71,7 @@
#include <nfs/nfsnode.h>
#include <nfs/nqnfs.h>
#include <nfs/nfsrtt.h>
+#include <nfs/nfs_lock.h>
static MALLOC_DEFINE(M_NFSSVC, "NFS srvsock", "Nfs server structure");
@@ -152,6 +155,12 @@ nfssvc(p, uap)
#endif /* NFS_NOSERVER */
int error;
+ if ((uap->flag & NFSSVC_LOCKDANS) != 0) {
+ struct lockd_ans la;
+
+ error = copyin(uap->argp, &la, sizeof(la));
+ return (error != 0 ? error : nfslockdans(p, &la));
+ }
/*
* Must be super user
*/
OpenPOWER on IntegriCloud