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
c5492cd9
Commit
c5492cd9
authored
Jan 30, 2019
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fuse/pathfs: take lock before inspecing node.clientInode
parent
40675bc3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
fuse/pathfs/pathfs.go
fuse/pathfs/pathfs.go
+2
-2
No files found.
fuse/pathfs/pathfs.go
View file @
c5492cd9
...
@@ -350,11 +350,11 @@ func (n *pathInode) OnRemove(parent *nodefs.Inode, name string) {
...
@@ -350,11 +350,11 @@ func (n *pathInode) OnRemove(parent *nodefs.Inode, name string) {
// setClientInode sets the inode number if has not been set yet.
// setClientInode sets the inode number if has not been set yet.
// This function exists to allow lazy-loading of the inode number.
// This function exists to allow lazy-loading of the inode number.
func
(
n
*
pathInode
)
setClientInode
(
ino
uint64
)
{
func
(
n
*
pathInode
)
setClientInode
(
ino
uint64
)
{
n
.
pathFs
.
pathLock
.
Lock
()
defer
n
.
pathFs
.
pathLock
.
Unlock
()
if
ino
==
0
||
n
.
clientInode
!=
0
||
!
n
.
pathFs
.
options
.
ClientInodes
||
n
.
Inode
()
.
IsDir
()
{
if
ino
==
0
||
n
.
clientInode
!=
0
||
!
n
.
pathFs
.
options
.
ClientInodes
||
n
.
Inode
()
.
IsDir
()
{
return
return
}
}
n
.
pathFs
.
pathLock
.
Lock
()
defer
n
.
pathFs
.
pathLock
.
Unlock
()
n
.
clientInode
=
ino
n
.
clientInode
=
ino
n
.
pathFs
.
clientInodeMap
[
ino
]
=
&
refCountedInode
{
node
:
n
,
refCount
:
1
}
n
.
pathFs
.
clientInodeMap
[
ino
]
=
&
refCountedInode
{
node
:
n
,
refCount
:
1
}
}
}
...
...
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