Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
4c0fbef3
Commit
4c0fbef3
authored
Mar 02, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e783f02d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
wcfs/client/wcfs.cpp
wcfs/client/wcfs.cpp
+7
-6
No files found.
wcfs/client/wcfs.cpp
View file @
4c0fbef3
...
@@ -420,11 +420,13 @@ error _Conn::__pin1(PinReq *req) {
...
@@ -420,11 +420,13 @@ error _Conn::__pin1(PinReq *req) {
mmap
->
_assertVMAOk
();
mmap
->
_assertVMAOk
();
// XXX recheck wrt Mapping.unmap: there it locks:
// XXX recheck wrt Mapping.unmap: there it locks:
// 1. virt_lock
// 1. virt_lock
// 2. f.mu
// 2. wconn.atMu.R
// 3. f.mu
//
//
// -> if here we do
// -> if here we do
// 1. f.mu
// 1. wconn.atMu.R
// 2. virt_lock
// 2. f.mu
// 3. virt_lock
//
//
// -> deadlock
// -> deadlock
virt_lock
();
virt_lock
();
...
@@ -783,8 +785,8 @@ error _FileH::close() {
...
@@ -783,8 +785,8 @@ error _FileH::close() {
ASSERT
(
fileh
.
_state
==
_FileHOpened
);
// there can be no open-in-progress, because
ASSERT
(
fileh
.
_state
==
_FileHOpened
);
// there can be no open-in-progress, because
fileh
.
_state
=
_FileHClosing
;
// .close() can be called only on "opened" fileh
fileh
.
_state
=
_FileHClosing
;
// .close() can be called only on "opened" fileh
// unlock wconn._filehMu to stop watching outside of this lock.
// unlock wconn._filehMu to stop watching
the file
outside of this lock.
// we'll relock
it
again before updating wconn.filehTab.
// we'll relock
wconn._filehMu
again before updating wconn.filehTab.
wconn
->
_filehMu
.
Unlock
();
wconn
->
_filehMu
.
Unlock
();
...
@@ -926,7 +928,6 @@ error _Mapping::unmap() {
...
@@ -926,7 +928,6 @@ error _Mapping::unmap() {
FileH
f
=
mmap
->
fileh
;
FileH
f
=
mmap
->
fileh
;
// NOTE virtmem lock is held by virtmem caller
// NOTE virtmem lock is held by virtmem caller
// XXX locking ok?
f
->
wconn
->
_atMu
.
RLock
();
f
->
wconn
->
_atMu
.
RLock
();
f
->
_mu
.
lock
();
// f._mmaps
f
->
_mu
.
lock
();
// f._mmaps
defer
([
&
]()
{
defer
([
&
]()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment