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:
parent
a1b1f3821d
commit
f3d055b6de
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user