You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: join_linux.go
    path of file: ./repos/moby/internal/safepath
    
    the code of the file until where you have to start completion: package safepath

import (
	"context"
	"os"
	"path/filepath"
	"runtime"
	"strconv"

	"github.com/containerd/log"
	"github.com/docker/docker/internal/unix_noeintr"
	"github.com/pkg/errors"
	"golang.org/x/s
    
func tempMountPoint(sourceFd int) (string, error) {
	var stat unix.Stat_t
	err := unix_noeintr.Fstat(sourceFd, &stat)
	if err != nil {
		return "", errors.Wrap(err, "failed to Fstat mount source fd")
	}

	isDir := (stat.Mode & unix.S_IFMT) == unix.S_IFDIR
	if isDir {
		return os.MkdirTemp("", "safe-mount")
	}

	f, err := os.CreateTemp("", "safe-mount")
	if err != nil {
		return "", err
	}

	p := f.Name()
	if err := f.Close(); err != nil {
		return "", err
	}
	return p, nil
}