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
3dce6f5d
Commit
3dce6f5d
authored
Apr 22, 2015
by
Frederick Akalin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Increment generation on inode reuse
parent
92a4cb63
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
fuse/nodefs/handle.go
fuse/nodefs/handle.go
+6
-3
No files found.
fuse/nodefs/handle.go
View file @
3dce6f5d
...
...
@@ -45,6 +45,7 @@ const _ALREADY_MSG = "Object already has a handle"
type
portableHandleMap
struct
{
sync
.
RWMutex
generation
uint64
used
int
handles
[]
*
handled
freeIds
[]
uint64
...
...
@@ -70,6 +71,7 @@ func (m *portableHandleMap) Register(obj *handled) (handle, generation uint64) {
}
else
{
handle
=
m
.
freeIds
[
len
(
m
.
freeIds
)
-
1
]
m
.
freeIds
=
m
.
freeIds
[
:
len
(
m
.
freeIds
)
-
1
]
m
.
generation
++
m
.
handles
[
handle
]
=
obj
}
m
.
used
++
...
...
@@ -78,6 +80,7 @@ func (m *portableHandleMap) Register(obj *handled) (handle, generation uint64) {
handle
=
obj
.
handle
}
obj
.
count
++
generation
=
m
.
generation
m
.
Unlock
()
return
}
...
...
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