nfs4: Fix directory cache revalidation when cache invalid

This commit is contained in:
Pawel Dziepak
2012-08-10 02:56:44 +02:00
parent b1fd656d45
commit 7f504091ec
@@ -185,6 +185,11 @@ DirectoryCache::Revalidate()
}
DirectoryCacheSnapshot* oldSnapshot = fDirectoryCache;
if (oldSnapshot == NULL) {
Trash();
return B_ERROR;
}
oldSnapshot->AcquireReference();
Trash();
@@ -194,7 +199,7 @@ DirectoryCache::Revalidate()
fAttrDir);
if (result != B_OK) {
oldSnapshot->ReleaseReference();
return B_OK;
return B_ERROR;
}
newSnapshot->AcquireReference();