Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
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
Kirill Smelkov
go-fuse
Commits
7c254a14
Commit
7c254a14
authored
Jun 30, 2013
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fuse/nodefs: provide more diagnostics in case of underflow.
parent
8b4fc94a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
fuse/nodefs/handle.go
fuse/nodefs/handle.go
+3
-3
No files found.
fuse/nodefs/handle.go
View file @
7c254a14
...
...
@@ -114,7 +114,7 @@ func (m *portableHandleMap) Forget(h uint64, count int) (forgotten bool, obj *ha
obj
=
m
.
handles
[
h
]
obj
.
count
-=
count
if
obj
.
count
<
0
{
panic
(
"underflow"
)
log
.
Panicf
(
"underflow: handle %d, count %d, object %d"
,
h
,
count
,
obj
.
count
)
}
else
if
obj
.
count
==
0
{
m
.
handles
[
h
]
=
nil
m
.
freeIds
=
append
(
m
.
freeIds
,
h
)
...
...
@@ -185,7 +185,7 @@ func (m *int32HandleMap) Forget(handle uint64, count int) (forgotten bool, obj *
delete
(
m
.
handles
,
uint32
(
handle
))
forgotten
=
true
}
else
if
obj
.
count
<
0
{
panic
(
"underflow"
)
log
.
Panicf
(
"underflow: handle %d count %d, obj %d"
,
handle
,
count
,
obj
.
count
)
}
obj
.
handle
=
0
m
.
mutex
.
Unlock
()
...
...
@@ -325,7 +325,7 @@ func (m *int64HandleMap) Forget(handle uint64, count int) (forgotten bool, obj *
obj
.
handle
=
0
forgotten
=
true
}
else
if
obj
.
count
<
0
{
panic
(
"underflow"
)
log
.
Panicf
(
"underflow: handle %d count %d, %d"
,
handle
,
count
,
obj
.
count
)
}
m
.
mutex
.
Unlock
()
return
forgotten
,
obj
...
...
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