removes a node from the list of in-memory children. This does not affect the inodes.
(target *node)
| 450 | // removes a node from the list of in-memory children. |
| 451 | // This does not affect the inodes. |
| 452 | func (n *node) removeChild(target *node) { |
| 453 | for i, child := range n.children { |
| 454 | if child == target { |
| 455 | n.children = append(n.children[:i], n.children[i+1:]...) |
| 456 | return |
| 457 | } |
| 458 | } |
| 459 | } |
| 460 | |
| 461 | // dereference causes the node to copy all its inode key/value references to heap memory. |
| 462 | // This is required when the mmap is reallocated so inodes are not pointing to stale data. |