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: mounted_linux.go
    path of file: ./repos/octant/vendor/github.com/moby/sys/mountinfo
    
    the code of the file until where you have to start completion: package mountinfo

import (
	"os"
	"path/filepath"

	"golang.org/x/sys/unix"
)

// mountedByOpenat2 is a method of detecting a mount that works for all kinds
// of mounts (incl. bind mounts), but requires a recent (v5.6+) linux kernel.
func mountedByOpenat2(path strin
    
func mounted(path string) (bool, error) {
	// Try a fast path, using openat2() with RESOLVE_NO_XDEV.
	mounted, err := mountedByOpenat2(path)
	if err == nil {
		return mounted, nil
	}
	// Another fast path: compare st.st_dev fields.
	mounted, err = mountedByStat(path)
	// This does not work for bind mounts, so false negative
	// is possible, therefore only trust if return is true.
	if mounted && err == nil {
		return mounted, nil
	}

	// Fallback to parsing mountinfo
	return mountedByMountinfo(path)
}