// PrependPath implements vfs.FilesystemImpl.PrependPath.
PrependPath implements vfs.FilesystemImpl.PrependPath.
// PrependPath implements vfs . FilesystemImpl . PrependPath .
func (fs *filesystem) PrependPath(ctx context.Context, vfsroot, vd vfs.VirtualDentry, b *fspath.Builder) error {
	fs.mu.RLock()
	defer fs.mu.RUnlock()
	mnt := vd.Mount()
	d := vd.Dentry().Impl().(*dentry)
	for {
		if mnt == vfsroot.Mount() && &d.vfsd == vfsroot.Dentry() {
			return vfs.PrependPathAtVFSRootError{}
		}
		if &d.vfsd == mnt.Root() {
			return nil
		}
		if d.parent == nil {
			if d.name != "" {
				b.PrependComponent("/" + d.name)
				b.AppendString(" (deleted)")
				return vfs.PrependPathSyntheticError{}
			}
			return vfs.PrependPathAtNonMountRootError{}
		}
		b.PrependComponent(d.name)
		d = d.parent
	}
}
func ( fs * filesystem ) PrependPath ( ctx context . Context , vfsroot , vd vfs . VirtualDentry , b * fspath . Builder ) error { fs . mu . RLock ( ) defer fs . mu . RUnlock ( ) mnt := vd . Mount ( ) d := vd . Dentry ( ) . Impl ( ) . ( * dentry ) for { if mnt == vfsroot . Mount ( ) && & d . vfsd == vfsroot . Dentry ( ) { return vfs . PrependPathAtVFSRootError { } } if & d . vfsd == mnt . Root ( ) { return nil } if d . parent == nil { if d . name != " " { b . PrependComponent ( " " + d . name ) b . AppendString ( " " ) return vfs . PrependPathSyntheticError { } } return vfs . PrependPathAtNonMountRootError { } } b . PrependComponent ( d . name ) d = d . parent } }
PrependPath implements vfs.FilesystemImpl.PrependPath.
PrependPath implements vfs . FilesystemImpl . PrependPath .
// This file must have been created by // newUnlinkedRegularFileDescription(). In Linux, // mm/shmem.c:__shmem_file_setup() => // fs/file_table.c:alloc_file_pseudo() sets the created // dentry's dentry_operations to anon_ops, for which d_dname == // simple_dname. fs/d_path.c:simple_dname() defines the // dentry's pathname to be its name, prefixed with "/" and // suffixed with " (deleted)".