diff options
author | kib <kib@FreeBSD.org> | 2008-12-23 20:04:31 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2008-12-23 20:04:31 +0000 |
commit | 87478ed893e95f5a309a45092c101a0a98e524cf (patch) | |
tree | 26afa2c0204f6d3f24921db625ce54c8af0be08e /sys | |
parent | 5b36b9db358a97ce359ba8d8fe44a7b4bb1b4131 (diff) | |
download | FreeBSD-src-87478ed893e95f5a309a45092c101a0a98e524cf.zip FreeBSD-src-87478ed893e95f5a309a45092c101a0a98e524cf.tar.gz |
Keep the hold on the vnode during VOP_VPTOCNP() call, allowing the vop
implementation to drop vnode lock, if needed.
Reported and tested by: pho
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 1d8e1c5..d3829c9 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -851,9 +851,9 @@ vn_vptocnp(struct vnode **vp, char **bp, char *buf, u_int *buflen) CACHE_UNLOCK(); vfslocked = VFS_LOCK_GIANT((*vp)->v_mount); vn_lock(*vp, LK_SHARED | LK_RETRY); - vdrop(*vp); error = VOP_VPTOCNP(*vp, &dvp, buf, buflen); VOP_UNLOCK(*vp, 0); + vdrop(*vp); VFS_UNLOCK_GIANT(vfslocked); if (error) { numfullpathfail2++; |