mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-25 11:37:56 +00:00
- If vn_lock fails with the LK_INTERLOCK flag set, interlock will not be
released. vcanrecycle() failed to unlock interlock under this condition. - Remove an extra VOP_UNLOCK from a failure case in vcanrecycle(). Pointed out by: rwatson
This commit is contained in:
parent
71ea4ba57c
commit
88cf6b94bd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=102211
@ -739,15 +739,16 @@ vcanrecycle(struct vnode *vp)
|
||||
|
||||
/* We should be able to immediately acquire this */
|
||||
/* XXX This looks like it should panic if it fails */
|
||||
if (vn_lock(vp, LK_INTERLOCK | LK_EXCLUSIVE, td) != 0)
|
||||
if (vn_lock(vp, LK_INTERLOCK | LK_EXCLUSIVE, td) != 0) {
|
||||
VI_UNLOCK(vp);
|
||||
return (EWOULDBLOCK);
|
||||
}
|
||||
/*
|
||||
* Don't recycle if we still have cached pages.
|
||||
*/
|
||||
if (VOP_GETVOBJECT(vp, &object) == 0 &&
|
||||
(object->resident_page_count ||
|
||||
object->ref_count)) {
|
||||
VOP_UNLOCK(vp, 0, td);
|
||||
error = EBUSY;
|
||||
goto done;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user