Rather than assert f_type==DTYPE_VNODE, conditionally perform the

file lock release based on f_type==DTYPE_VNODE.  vn_closefile() is
used by non-vnode types as well (fifo).
This commit is contained in:
Robert Watson 2004-06-01 23:36:47 +00:00
parent a1b1f3821d
commit f3d055b6de

View File

@ -915,10 +915,9 @@ vn_closefile(fp, td)
GIANT_REQUIRED;
KASSERT(fp->f_type == DTYPE_VNODE, ("vn_closefile: !DTYPE_VNODE"));
vp = fp->f_vnode;
if (fp->f_flag & FHASLOCK) {
if (fp->f_type == DTYPE_VNODE && fp->f_flag & FHASLOCK) {
lf.l_whence = SEEK_SET;
lf.l_start = 0;
lf.l_len = 0;