Commit 4c0fbef3 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent e783f02d
......@@ -420,11 +420,13 @@ error _Conn::__pin1(PinReq *req) {
mmap->_assertVMAOk();
// XXX recheck wrt Mapping.unmap: there it locks:
// 1. virt_lock
// 2. f.mu
// 2. wconn.atMu.R
// 3. f.mu
//
// -> if here we do
// 1. f.mu
// 2. virt_lock
// 1. wconn.atMu.R
// 2. f.mu
// 3. virt_lock
//
// -> deadlock
virt_lock();
......@@ -783,8 +785,8 @@ error _FileH::close() {
ASSERT(fileh._state == _FileHOpened); // there can be no open-in-progress, because
fileh._state = _FileHClosing; // .close() can be called only on "opened" fileh
// unlock wconn._filehMu to stop watching outside of this lock.
// we'll relock it again before updating wconn.filehTab.
// unlock wconn._filehMu to stop watching the file outside of this lock.
// we'll relock wconn._filehMu again before updating wconn.filehTab.
wconn->_filehMu.Unlock();
......@@ -926,7 +928,6 @@ error _Mapping::unmap() {
FileH f = mmap->fileh;
// NOTE virtmem lock is held by virtmem caller
// XXX locking ok?
f->wconn->_atMu.RLock();
f->_mu.lock(); // f._mmaps
defer([&]() {
......
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