diff options
author | dfr <dfr@FreeBSD.org> | 2009-06-04 08:13:51 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2009-06-04 08:13:51 +0000 |
commit | ad8e2a2c53409ba5af5c25f511693706568c5fef (patch) | |
tree | 066714b7c5f9ccad6836055401d6fa551d8d0d17 | |
parent | 8169fd25adc3c722062436a31519ed3460624eb0 (diff) | |
download | FreeBSD-src-ad8e2a2c53409ba5af5c25f511693706568c5fef.zip FreeBSD-src-ad8e2a2c53409ba5af5c25f511693706568c5fef.tar.gz |
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.
-rw-r--r-- | sys/nlm/nlm_advlock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/nlm/nlm_advlock.c b/sys/nlm/nlm_advlock.c index 0be799d..2d94045 100644 --- a/sys/nlm/nlm_advlock.c +++ b/sys/nlm/nlm_advlock.c @@ -716,8 +716,8 @@ nlm_record_lock(struct vnode *vp, int op, struct flock *fl, 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 |