added 1 changeset to branch 'refs/remotes/pdziepak-github/nfs4' old head: b1fd656d454ab89fbfdac09fda1b6aafd81bbe89 new head: 7f504091ecf0cec2316b9c5fa079836d56130624 ---------------------------------------------------------------------------- 7f50409: nfs4: Fix directory cache revalidation when cache invalid [ Pawel Dziepak <pdziepak@xxxxxxxxxxx> ] ---------------------------------------------------------------------------- Commit: 7f504091ecf0cec2316b9c5fa079836d56130624 Author: Pawel Dziepak <pdziepak@xxxxxxxxxxx> Date: Fri Aug 10 00:56:44 2012 UTC ---------------------------------------------------------------------------- 1 file changed, 6 insertions(+), 1 deletion(-) .../kernel/file_systems/nfs4/DirectoryCache.cpp | 7 ++++++- ---------------------------------------------------------------------------- diff --git a/src/add-ons/kernel/file_systems/nfs4/DirectoryCache.cpp b/src/add-ons/kernel/file_systems/nfs4/DirectoryCache.cpp index 909f629..e7062c0 100644 --- a/src/add-ons/kernel/file_systems/nfs4/DirectoryCache.cpp +++ b/src/add-ons/kernel/file_systems/nfs4/DirectoryCache.cpp @@ -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();