BFS: Fix vising attribute runs in FileSystemVisitor.
See inline comment. Fixes "vnode refcount > 0" assert failures while running checkfs after yesterday's commits.
This commit is contained in:
parent
13c4bc94ca
commit
b08b51b417
@ -161,8 +161,14 @@ FileSystemVisitor::Next()
|
|||||||
// If the inode has an attribute directory that we want to visit,
|
// If the inode has an attribute directory that we want to visit,
|
||||||
// push it on the stack
|
// push it on the stack
|
||||||
if ((fFlags & VISIT_ATTRIBUTE_DIRECTORIES)
|
if ((fFlags & VISIT_ATTRIBUTE_DIRECTORIES)
|
||||||
&& !inode->Attributes().IsZero()) {
|
&& !inode->Attributes().IsZero()) {
|
||||||
fStack.Push(inode->Attributes());
|
fStack.Push(inode->Attributes());
|
||||||
|
|
||||||
|
// We may already be keeping the associated Vnode, so we can't
|
||||||
|
// just call vnode.Keep() here, but rather acquire another reference
|
||||||
|
// to it specifically.
|
||||||
|
Vnode attrNode(fVolume, inode->Attributes());
|
||||||
|
attrNode.Keep();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool visitingCurrentDirectory = inode->BlockRun() == fCurrent;
|
bool visitingCurrentDirectory = inode->BlockRun() == fCurrent;
|
||||||
|
Loading…
Reference in New Issue
Block a user