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

.

parent 12315d18
......@@ -615,8 +615,7 @@ pair<FileH, error> _Conn::open(zodb::Oid foid) {
f->_openReady.recv();
if (f->_openErr != nil) {
// XXX lock/unlock wconn._mu around nopen-- ?
f->_nopen--;
// don't care about f->_nopen-- since f is not returned anywhere
return make_pair(nil, E(f->_openErr));
}
......@@ -641,7 +640,7 @@ pair<FileH, error> _Conn::open(zodb::Oid foid) {
defer([&]() {
if (!retok) {
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
wconn._filehTab.erase(foid);
wconn._mu.Unlock();
......@@ -713,7 +712,7 @@ error _FileH::close() {
// XXX locking ok?
wconn->_atMu.RLock();
fileh._mu.lock();
fileh._mu.lock(); // XXX for fileh ._nopen, ._closed ->better use wconn._mu for those too?
defer([&]() {
fileh._mu.unlock();
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