nfs4: Fix directory cache revalidation when cache invalid
This commit is contained in:
@@ -185,6 +185,11 @@ DirectoryCache::Revalidate()
|
|||||||
}
|
}
|
||||||
|
|
||||||
DirectoryCacheSnapshot* oldSnapshot = fDirectoryCache;
|
DirectoryCacheSnapshot* oldSnapshot = fDirectoryCache;
|
||||||
|
if (oldSnapshot == NULL) {
|
||||||
|
Trash();
|
||||||
|
return B_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
oldSnapshot->AcquireReference();
|
oldSnapshot->AcquireReference();
|
||||||
|
|
||||||
Trash();
|
Trash();
|
||||||
@@ -194,7 +199,7 @@ DirectoryCache::Revalidate()
|
|||||||
fAttrDir);
|
fAttrDir);
|
||||||
if (result != B_OK) {
|
if (result != B_OK) {
|
||||||
oldSnapshot->ReleaseReference();
|
oldSnapshot->ReleaseReference();
|
||||||
return B_OK;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
newSnapshot->AcquireReference();
|
newSnapshot->AcquireReference();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user