Commit a327d849 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

If a file system was unmounted, use root node's negative timeout.

This fixes a potential null dereference.
parent 04b2200a
...@@ -42,7 +42,8 @@ func (me *FileSystemConnector) internalLookupWithNode(parent *inode, name string ...@@ -42,7 +42,8 @@ func (me *FileSystemConnector) internalLookupWithNode(parent *inode, name string
// Init. // Init.
fullPath, mount := parent.GetPath() fullPath, mount := parent.GetPath()
if mount == nil { if mount == nil {
return NegativeEntry(mount.options.NegativeTimeout), OK, nil rootMount := me.rootNode.mount
return NegativeEntry(rootMount.options.NegativeTimeout), OK, nil
} }
fullPath = filepath.Join(fullPath, name) fullPath = filepath.Join(fullPath, name)
......
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