summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2004-03-06 04:09:54 +0000
committerkan <kan@FreeBSD.org>2004-03-06 04:09:54 +0000
commite795b7939d0e6a89ca34a05f6658f74df6c7644c (patch)
tree3ca2852989620ee355da214c11469120256e28e1 /sys
parent3537c363d9ca3c6108161283011d90a83bba0896 (diff)
downloadFreeBSD-src-e795b7939d0e6a89ca34a05f6658f74df6c7644c.zip
FreeBSD-src-e795b7939d0e6a89ca34a05f6658f74df6c7644c.tar.gz
Always call vn_finished_write after vn_start_write was called. All
occurences of 'goto done' after vn_start_write invocation were cleaning up incompletely.
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/vfs_subr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 616791d..0a6f4f9 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -614,8 +614,8 @@ vtryrecycle(struct vnode *vp)
* Don't recycle if its filesystem is being suspended.
*/
if (vn_start_write(vp, &vnmp, V_NOWAIT) != 0) {
- error = EBUSY;
- goto done;
+ VOP_UNLOCK(vp, 0, td);
+ return (EBUSY);
}
/*
@@ -687,6 +687,7 @@ vtryrecycle(struct vnode *vp)
return (0);
done:
VOP_UNLOCK(vp, 0, td);
+ vn_finished_write(vnmp);
return (error);
}
OpenPOWER on IntegriCloud