summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/vfs/filesystem_impl_util.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-04-21 19:20:51 +0000
committergVisor bot <gvisor-bot@google.com>2020-04-21 19:20:51 +0000
commitb5cdbb659d6ecd5a38090093369c81db76e8a152 (patch)
tree533d1ae7bafb1e27b601b62cc24b2cfc99ee6a5a /pkg/sentry/vfs/filesystem_impl_util.go
parent3477221b21c89c56d64b039324513cda51b3f50a (diff)
parent9b5e305e05ef3ad51778981062d6152cea1cd4fb (diff)
Merge release-20200323.0-203-g9b5e305 (automated)
Diffstat (limited to 'pkg/sentry/vfs/filesystem_impl_util.go')
-rwxr-xr-xpkg/sentry/vfs/filesystem_impl_util.go26
1 files changed, 0 insertions, 26 deletions
diff --git a/pkg/sentry/vfs/filesystem_impl_util.go b/pkg/sentry/vfs/filesystem_impl_util.go
index 7315a588e..465e610e0 100755
--- a/pkg/sentry/vfs/filesystem_impl_util.go
+++ b/pkg/sentry/vfs/filesystem_impl_util.go
@@ -16,8 +16,6 @@ package vfs
import (
"strings"
-
- "gvisor.dev/gvisor/pkg/fspath"
)
// GenericParseMountOptions parses a comma-separated list of options of the
@@ -43,27 +41,3 @@ func GenericParseMountOptions(str string) map[string]string {
}
return m
}
-
-// GenericPrependPath may be used by implementations of
-// FilesystemImpl.PrependPath() for which a single statically-determined lock
-// or set of locks is sufficient to ensure its preconditions (as opposed to
-// e.g. per-Dentry locks).
-//
-// Preconditions: Dentry.Name() and Dentry.Parent() must be held constant for
-// vd.Dentry() and all of its ancestors.
-func GenericPrependPath(vfsroot, vd VirtualDentry, b *fspath.Builder) error {
- mnt, d := vd.mount, vd.dentry
- for {
- if mnt == vfsroot.mount && d == vfsroot.dentry {
- return PrependPathAtVFSRootError{}
- }
- if d == mnt.root {
- return nil
- }
- if d.parent == nil {
- return PrependPathAtNonMountRootError{}
- }
- b.PrependComponent(d.name)
- d = d.parent
- }
-}