diff options
author | rwatson <rwatson@FreeBSD.org> | 2003-05-15 21:13:08 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2003-05-15 21:13:08 +0000 |
commit | 1db54a2d45e200e5c772193676e29fdc69f88759 (patch) | |
tree | 70eec98b1a3e899caeab2399383e514e01e5bbc0 /sys | |
parent | 94ff93f449f6846c6c61435659387b97cfd4aa8c (diff) | |
download | FreeBSD-src-1db54a2d45e200e5c772193676e29fdc69f88759.zip FreeBSD-src-1db54a2d45e200e5c772193676e29fdc69f88759.tar.gz |
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
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_descrip.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 2e162cd..5e5bee0 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -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: |