Commit ed841342 authored by Jakob Unterwurzacher's avatar Jakob Unterwurzacher

pathfs: fix logic error in OnRemove

We must match "v.parent" against "parentPI", not against ourself.

This caused entries in the clientInodeMap to never be removed.

Change-Id: Icab14e425105851071a4d95776b4599ba9353a2d
parent 71647659
......@@ -371,9 +371,9 @@ func (n *pathInode) OnRemove(parent *nodefs.Inode, name string) {
m := n.pathFs.clientInodeMap[n.clientInode]
idx := -1
// Find the entry that has us as the parent
// Find the right entry: both "parent" and "name" must match
for i, v := range m {
if v.parent == n && v.name == name {
if v.parent == parentPI && v.name == name {
idx = i
break
}
......
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