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
Levin Zimmermann
go-fuse
Commits
1ff48a1a
Commit
1ff48a1a
authored
Apr 22, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop mutex in mountData.
parent
6e8cfed7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
fuse/pathfilesystem.go
fuse/pathfilesystem.go
+8
-12
No files found.
fuse/pathfilesystem.go
View file @
1ff48a1a
...
...
@@ -14,10 +14,15 @@ type mountData struct {
// If non-nil the file system mounted here.
fs
FileSystem
// Protects the variables below.
mutex
sync
.
RWMutex
// If yes, we are looking to unmount the mounted fs.
//
// To be technically correct, we'd have to have a mutex
// protecting this. We don't, keeping the following in mind:
//
// * eventual consistency is OK here
//
// * the kernel controls when to ask for updates,
// so we can't make entries directly anyway.
unmountPending
bool
}
...
...
@@ -94,8 +99,6 @@ func (me *inode) GetPath() (path string, mount *mountData) {
}
mount
=
inode
.
mount
mount
.
mutex
.
RLock
()
defer
mount
.
mutex
.
RUnlock
()
if
mount
.
unmountPending
{
return
""
,
nil
}
...
...
@@ -306,11 +309,6 @@ func (me *FileSystemConnector) forgetUpdate(nodeId uint64, forgetCount int) {
}
func
(
me
*
FileSystemConnector
)
considerDropInode
(
n
*
inode
)
{
if
n
.
mount
!=
nil
{
n
.
mount
.
mutex
.
RLock
()
defer
n
.
mount
.
mutex
.
RUnlock
()
}
// TODO - this should probably not happen at all.
if
n
.
LookupCount
<=
0
&&
len
(
n
.
Children
)
==
0
&&
(
n
.
mount
==
nil
||
n
.
mount
.
unmountPending
)
&&
n
.
OpenCount
<=
0
{
...
...
@@ -478,8 +476,6 @@ func (me *FileSystemConnector) Unmount(path string) Status {
log
.
Println
(
"Unmount: "
,
mount
)
}
mount
.
mutex
.
Lock
()
defer
mount
.
mutex
.
Unlock
()
if
len
(
node
.
Children
)
>
0
{
mount
.
fs
.
Unmount
()
mount
.
unmountPending
=
true
...
...
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