Index: nfs_lock.c
===================================================================
RCS file: /data/ncvs/src/sys/nfsclient/nfs_lock.c,v
retrieving revision 1.32
diff -u -r1.32 nfs_lock.c
--- nfs_lock.c	19 Feb 2003 05:47:38 -0000	1.32
+++ nfs_lock.c	26 Mar 2003 17:37:16 -0000
@@ -143,10 +143,20 @@
 	 */
 	NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, _PATH_LCKFIFO, td);
 
-	fmode = FFLAGS(O_WRONLY);
+	fmode = FFLAGS(O_WRONLY | O_NONBLOCK);
 	error = vn_open_cred(&nd, &fmode, 0, thread0.td_ucred);
-	if (error != 0) {
-		return (error == ENOENT ? EOPNOTSUPP : error);
+	switch (error) {
+	case ENOENT:
+	case ENXIO:
+		/*
+		 * Map a failure to find the fifo or no listener on the
+		 * fifo to locking not being supported.
+		 */
+		return (EOPNOTSUPP);
+	case 0:
+		break;
+	default:
+		return (error);
 	}
 	wvp = nd.ni_vp;
 	VOP_UNLOCK(wvp, 0, td);		/* vn_open leaves it locked */
