Commit 862d57af authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 9212b13c
......@@ -306,7 +306,7 @@ error _Conn::__pin1(PinReq *req) {
// on error don't need to continue with other mappings - all fileh and
// all mappings become marked invalid on pinner failure.
// XXX all call wconn._down from here under wconn._filehmu lock?
// XXX all call wconn._down from here under wconn._mu lock?
if (err != nil)
return err;
......@@ -435,11 +435,11 @@ error _FileH::close() {
// remove fileh from wconn._filehTab
// fileh.close can be called several times and after first call another
// fileh could be opened for the same foid. Be careful not to erase it.
wconn->_filehmu.lock();
wconn->_mu.lock();
// XXX decref open count
if (wconn->_filehTab.get(fileh.foid)._ptr() == &fileh)
wconn->_filehTab.erase(fileh.foid);
wconn->_filehmu.unlock();
wconn->_mu.unlock();
return E(fileh._headf->close());
}
......@@ -582,9 +582,9 @@ error _Conn::resync(zodb::Tid at) {
error err;
wconn._downMu.lock();
// wconn._downMu.lock(); XXX
err = wconn._downErr;
wconn._downMu.unlock();
// wconn._downMu.unlock(); XXX
if (err != nil)
return E(err);
......@@ -713,15 +713,15 @@ error _Mapping::_remmapblk(int64_t blk, zodb::Tid at) {
// RW dirty page was e.g. discarded.
error _Mapping::remmap_blk(int64_t blk) {
_Mapping& mmap = *this;
FileH f = mmap->fileh;
FileH f = mmap.fileh;
// NOTE virtmem lock is held by virtmem caller
// XXX locking ok?
f.wconn._atMu.RLock();
f._mu.lock();
f->wconn->_atMu.RLock();
f->_mu.lock();
defer([&]() {
f._mu.unlock();
f.wconn._atMu.RUnlock();
f->_mu.unlock();
f->wconn->_atMu.RUnlock();
});
if (!(mmap.blk_start <= blk && blk < mmap.blk_stop()))
......
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