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

Make SubmountFileSystem resistant to inquiries for nonexistent nodes.

parent fe0d2505
......@@ -126,7 +126,11 @@ func (me *SubmountFileSystem) registerLookup(subInode uint64, subfs *subFsInfo)
func (me *SubmountFileSystem) getSubFs(local uint64) (nodeid uint64, subfs *subFsInfo) {
me.nodeMapLock.RLock()
defer me.nodeMapLock.RUnlock()
data := me.nodeMap[local]
data, ok := me.nodeMap[local]
if !ok {
return 0, nil
}
return data.NodeId, data.SubFs
}
......
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