Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jacobsa-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
jacobsa-fuse
Commits
f7f7ac8f
Commit
f7f7ac8f
authored
Jun 25, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed build errors.
parent
99080585
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
9 deletions
+1
-9
samples/memfs/memfs.go
samples/memfs/memfs.go
+1
-9
No files found.
samples/memfs/memfs.go
View file @
f7f7ac8f
...
...
@@ -401,13 +401,9 @@ func (fs *memFS) Rename(
fs
.
mu
.
Lock
()
defer
fs
.
mu
.
Unlock
()
// Ask the old parent for the child's inode ID. Unlock because we need to
// lock the new parent. This should be safe without risk of the referrent of
// the name changing, because the kernel needs to hold a lock on each of the
// parents.
// Ask the old parent for the child's inode ID and type.
oldParent
:=
fs
.
getInodeOrDie
(
op
.
OldParent
)
childID
,
childType
,
ok
:=
oldParent
.
LookUpChild
(
op
.
OldName
)
oldParent
.
mu
.
Unlock
()
if
!
ok
{
err
=
fuse
.
ENOENT
...
...
@@ -427,12 +423,8 @@ func (fs *memFS) Rename(
op
.
NewName
,
childType
)
newParent
.
mu
.
Unlock
()
// Finally, remove the old name from the old parent.
oldParent
.
mu
.
Lock
()
oldParent
.
RemoveChild
(
op
.
OldName
)
oldParent
.
mu
.
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