fuse: don't call dentry.InsertChild
It is called from the kernfs code (OpenAt and revalidateChildLocked()). For RemoveChildLocked, it is opposed. We need to call it from fuse.RmDir and fuse.Unlink. PiperOrigin-RevId: 333453218
This commit is contained in:
parent
03898a087d
commit
3838e83a98
|
@ -528,12 +528,7 @@ func (i *inode) RmDir(ctx context.Context, name string, child *vfs.Dentry) error
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(Before merging): When creating new nodes, should we add nodes to the ordered children?
|
return i.dentry.RemoveChildLocked(name, child)
|
||||||
// If so we'll probably need to call this. We will also need to add them with the writable flag when
|
|
||||||
// appropriate.
|
|
||||||
// return i.OrderedChildren.RmDir(ctx, name, child)
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// newEntry calls FUSE server for entry creation and allocates corresponding entry according to response.
|
// newEntry calls FUSE server for entry creation and allocates corresponding entry according to response.
|
||||||
|
@ -563,11 +558,6 @@ func (i *inode) newEntry(ctx context.Context, name string, fileType linux.FileMo
|
||||||
return nil, syserror.EIO
|
return nil, syserror.EIO
|
||||||
}
|
}
|
||||||
child := i.fs.newInode(out.NodeID, out.Attr)
|
child := i.fs.newInode(out.NodeID, out.Attr)
|
||||||
if opcode == linux.FUSE_LOOKUP {
|
|
||||||
i.dentry.InsertChildLocked(name, child)
|
|
||||||
} else {
|
|
||||||
i.dentry.InsertChild(name, child)
|
|
||||||
}
|
|
||||||
return child, nil
|
return child, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue