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
267c3a34
Commit
267c3a34
authored
Mar 02, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
9617c6c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
wcfs/client/wcfs.cpp
wcfs/client/wcfs.cpp
+6
-3
No files found.
wcfs/client/wcfs.cpp
View file @
267c3a34
...
...
@@ -641,7 +641,7 @@ pair<FileH, error> _Conn::open(zodb::Oid foid) {
return
make_pair
(
f
,
nil
);
}
// create
in-flight-opening
FileH entry and perform open with wconn._mu released
// create
"opening"
FileH entry and perform open with wconn._mu released
// NOTE wconn._atMu.R is still held because FileH._open relies on wconn.at being stable.
f
=
adoptref
(
new
_FileH
());
f
->
wconn
=
newref
(
&
wconn
);
...
...
@@ -660,7 +660,10 @@ pair<FileH, error> _Conn::open(zodb::Oid foid) {
if
(
!
retok
)
{
wconn
.
_mu
.
Lock
();
// don't care about f->_nopen-- since f is not returned anywhere
// XXX assert filehTab[foid] == f
if
(
wconn
.
_filehTab
.
get
(
foid
)
!=
f
)
{
wconn
.
_mu
.
Unlock
();
panic
(
"BUG: wconn.open: wconn.filehTab[foid] mutated while file open was in progress"
);
}
wconn
.
_filehTab
.
erase
(
foid
);
wconn
.
_mu
.
Unlock
();
}
...
...
@@ -745,7 +748,7 @@ error _FileH::close() {
// decref open count; do real close only when last open goes away.
if
(
fileh
.
_nopen
<=
0
)
panic
(
"BUG: fileh._nopen <= 0"
);
panic
(
"BUG: fileh.
close: fileh.
_nopen <= 0"
);
fileh
.
_nopen
--
;
if
(
fileh
.
_nopen
>
0
)
return
nil
;
...
...
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