summaryrefslogtreecommitdiffhomepage
path: root/pkg/p9/handlers.go
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2019-06-21 12:25:24 -0700
committergVisor bot <gvisor-bot@google.com>2019-06-21 12:26:42 -0700
commitc0317b28cb3f8346ee81564ee477aafdf6283f45 (patch)
treebb91240172a173aba9ed799deab7026d8e197ee1 /pkg/p9/handlers.go
parentf94653b3dea629f365ce5742b99bbcaa7673ded2 (diff)
Update pathNode documentation to reflect reality
Neither fidRefs or children are (directly) synchronized by mu. Remove the preconditions that say so. That said, the surrounding does enforce some synchronization guarantees (e.g., fidRef.renameChildTo does not atomically replace the child in the maps). I've tried to note the need for callers to do this synchronization. I've also renamed the maps to what are (IMO) clearer names. As is, it is not obvious that pathNode.fidRefs is a map of *child* fidRefs rather than self fidRefs. PiperOrigin-RevId: 254446965
Diffstat (limited to 'pkg/p9/handlers.go')
-rw-r--r--pkg/p9/handlers.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/p9/handlers.go b/pkg/p9/handlers.go
index 1a976bd13..9e622227b 100644
--- a/pkg/p9/handlers.go
+++ b/pkg/p9/handlers.go
@@ -545,7 +545,7 @@ func (t *Tunlinkat) handle(cs *connState) message {
// Before we do the unlink itself, we need to ensure that there
// are no operations in flight on associated path node. The
// child's path node lock must be held to ensure that the
- // unlink at marking the child deleted below is atomic with
+ // unlinkat marking the child deleted below is atomic with
// respect to any other read or write operations.
//
// This is one case where we have a lock ordering issue, but