Commit 83dd60a5 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Fix race condition: canUnmount needs tree to be locked.

parent eedf4e5e
......@@ -323,6 +323,9 @@ func (c *FileSystemConnector) Unmount(node *Inode) Status {
return EBUSY
}
node.treeLock.Lock()
defer node.treeLock.Unlock()
mountInode := mount.mountInode
if !mountInode.canUnmount() {
return EBUSY
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment