aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend/root_node.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2020-06-21 13:46:08 +0200
committerJakob Unterwurzacher2020-06-21 13:46:08 +0200
commit192a29075a7a567931959c2b4c8e4a9513742eee (patch)
tree4cc2eb036fe60a1e66c6f704a69eadf7fd664d87 /internal/fusefrontend/root_node.go
parentf6ded09e36a679695354f4b9bc74242ef399be09 (diff)
v2api: implement Mkdir
Diffstat (limited to 'internal/fusefrontend/root_node.go')
-rw-r--r--internal/fusefrontend/root_node.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/fusefrontend/root_node.go b/internal/fusefrontend/root_node.go
index c84ac93..be82851 100644
--- a/internal/fusefrontend/root_node.go
+++ b/internal/fusefrontend/root_node.go
@@ -2,6 +2,7 @@ package fusefrontend
import (
"os"
+ "sync"
"sync/atomic"
"syscall"
"time"
@@ -19,6 +20,10 @@ type RootNode struct {
Node
// args stores configuration arguments
args Args
+ // dirIVLock: Lock()ed if any "gocryptfs.diriv" file is modified
+ // Readers must RLock() it to prevent them from seeing intermediate
+ // states
+ dirIVLock sync.RWMutex
// Filename encryption helper
nameTransform nametransform.NameTransformer
// Content encryption helper