It's not so problematic if a busy vnode was released; what is problematic is
if that was the last ref. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16590 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -695,18 +695,16 @@ free_vnode(struct vnode *vnode, bool reenter)
|
|||||||
static status_t
|
static status_t
|
||||||
dec_vnode_ref_count(struct vnode *vnode, bool reenter)
|
dec_vnode_ref_count(struct vnode *vnode, bool reenter)
|
||||||
{
|
{
|
||||||
int32 oldRefCount;
|
|
||||||
|
|
||||||
mutex_lock(&sVnodeMutex);
|
mutex_lock(&sVnodeMutex);
|
||||||
|
|
||||||
if (vnode->busy)
|
int32 oldRefCount = atomic_add(&vnode->ref_count, -1);
|
||||||
panic("dec_vnode_ref_count called on vnode that was busy! vnode %p\n", vnode);
|
|
||||||
|
|
||||||
oldRefCount = atomic_add(&vnode->ref_count, -1);
|
|
||||||
|
|
||||||
TRACE(("dec_vnode_ref_count: vnode %p, ref now %ld\n", vnode, vnode->ref_count));
|
TRACE(("dec_vnode_ref_count: vnode %p, ref now %ld\n", vnode, vnode->ref_count));
|
||||||
|
|
||||||
if (oldRefCount == 1) {
|
if (oldRefCount == 1) {
|
||||||
|
if (vnode->busy)
|
||||||
|
panic("dec_vnode_ref_count: called on busy vnode %p\n", vnode);
|
||||||
|
|
||||||
bool freeNode = false;
|
bool freeNode = false;
|
||||||
|
|
||||||
// Just insert the vnode into an unused list if we don't need
|
// Just insert the vnode into an unused list if we don't need
|
||||||
|
|||||||
Reference in New Issue
Block a user