Commit 28b720a7 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 12315d18
...@@ -615,8 +615,7 @@ pair<FileH, error> _Conn::open(zodb::Oid foid) { ...@@ -615,8 +615,7 @@ pair<FileH, error> _Conn::open(zodb::Oid foid) {
f->_openReady.recv(); f->_openReady.recv();
if (f->_openErr != nil) { if (f->_openErr != nil) {
// XXX lock/unlock wconn._mu around nopen-- ? // don't care about f->_nopen-- since f is not returned anywhere
f->_nopen--;
return make_pair(nil, E(f->_openErr)); return make_pair(nil, E(f->_openErr));
} }
...@@ -641,7 +640,7 @@ pair<FileH, error> _Conn::open(zodb::Oid foid) { ...@@ -641,7 +640,7 @@ pair<FileH, error> _Conn::open(zodb::Oid foid) {
defer([&]() { defer([&]() {
if (!retok) { if (!retok) {
wconn._mu.Lock(); wconn._mu.Lock();
f->_nopen--; // XXX locking ok? // don't care about f->_nopen-- since f is not returned anywhere
// XXX assert filehTab[foid] == f // XXX assert filehTab[foid] == f
wconn._filehTab.erase(foid); wconn._filehTab.erase(foid);
wconn._mu.Unlock(); wconn._mu.Unlock();
...@@ -713,7 +712,7 @@ error _FileH::close() { ...@@ -713,7 +712,7 @@ error _FileH::close() {
// XXX locking ok? // XXX locking ok?
wconn->_atMu.RLock(); wconn->_atMu.RLock();
fileh._mu.lock(); fileh._mu.lock(); // XXX for fileh ._nopen, ._closed ->better use wconn._mu for those too?
defer([&]() { defer([&]() {
fileh._mu.unlock(); fileh._mu.unlock();
wconn->_atMu.RUnlock(); wconn->_atMu.RUnlock();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment