VOP_PATHCONF() requires a vnode lock; this patch adds locking to
fpathconf(). The lock is held for direct calls to VOP_PATHCONF() in pathconf() already. Approved by: re (jhb) Pointed out by: DEBUG_VFS_LOCKS
This commit is contained in:
parent
94ff93f449
commit
1db54a2d45
@ -986,7 +986,9 @@ fpathconf(td, uap)
|
||||
case DTYPE_VNODE:
|
||||
vp = fp->f_data;
|
||||
mtx_lock(&Giant);
|
||||
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
|
||||
error = VOP_PATHCONF(vp, uap->name, td->td_retval);
|
||||
VOP_UNLOCK(vp, 0, td);
|
||||
mtx_unlock(&Giant);
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user