svn commit: r193432 - head/sys/nlm

Doug Rabson dfr at FreeBSD.org
Thu Jun 4 08:13:52 UTC 2009


Author: dfr
Date: Thu Jun  4 08:13:51 2009
New Revision: 193432
URL: http://svn.freebsd.org/changeset/base/193432

Log:
  Don't panic in nlm_record_lock if we get ENOENT from lf_advlockasync. This
  is likely to be because the file was just removed and in our context this is
  harmless.

Modified:
  head/sys/nlm/nlm_advlock.c

Modified: head/sys/nlm/nlm_advlock.c
==============================================================================
--- head/sys/nlm/nlm_advlock.c	Thu Jun  4 06:57:50 2009	(r193431)
+++ head/sys/nlm/nlm_advlock.c	Thu Jun  4 08:13:51 2009	(r193432)
@@ -716,8 +716,8 @@ nlm_record_lock(struct vnode *vp, int op
 	newfl.l_sysid = NLM_SYSID_CLIENT | sysid;
 
 	error = lf_advlockasync(&a, &vp->v_lockf, size);
-	KASSERT(error == 0, ("Failed to register NFS lock locally - error=%d",
-		error));
+	KASSERT(error == 0 || errno == ENOENT,
+	    ("Failed to register NFS lock locally - error=%d", error));
 }
 
 static int


More information about the svn-src-all mailing list