The kind of comment that saves you half an hour of brooding if you, for some

reason, don't see the obvious. Well, or doesn't if absent...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20230 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2007-02-25 20:07:14 +00:00
parent 07628e25b1
commit 61381bf71d
2 changed files with 6 additions and 0 deletions

View File

@ -583,6 +583,7 @@ Volume::Create(void* dir, const char* name, int openMode, int mode,
*cookie = reply->fileCookie;
if (error == B_OK)
_DecrementVNodeCount(*vnid);
// The VFS will balance the new_vnode() call for the FS.
return error;
}
@ -1400,6 +1401,7 @@ Volume::Walk(void* dir, const char* entryName, char** resolvedPath,
if (GetVNode(fRootID, &entryNode) != B_OK)
RETURN_ERROR(B_BAD_VALUE);
*vnid = fRootID;
// The VFS will balance the get_vnode() call for the FS.
_DecrementVNodeCount(*vnid);
return B_OK;
}
@ -2447,6 +2449,7 @@ Volume::_Walk(void* dir, const char* entryName, char** resolvedPath,
_DecrementVNodeCount(*vnid);
} else
_DecrementVNodeCount(*vnid);
// The VFS will balance the get_vnode() call for the FS.
return error;
}

View File

@ -201,6 +201,9 @@ private:
vint32 fOpenIndexDirectories;
vint32 fOpenQueries;
VNodeCountMap* fVNodeCountMap;
// Tracks the number of new/get_vnode()
// calls to be balanced by the FS by
// corresponding put_vnode()s.
volatile bool fVNodeCountingEnabled;
};