code: func useDirperm() bool {
  	enableDirpermLock.Do(func() {
  		base, err := ioutil.TempDir("", "docker-aufs-base")
  		if err != nil {
  			logger.Errorf("error checking dirperm1: %v", err)
  			return
  		}
  		defer os.RemoveAll(base)
  
  		union, err := ioutil.TempDir("", "docker-aufs-union")
  		if err != nil {
  			logger.Errorf("error checking dirperm1: %v", err)
  			return
  		}
  		defer os.RemoveAll(union)
  
  		opts := fmt.Sprintf("br:%s,dirperm1,xino=/dev/shm/aufs.xino", base)
  		if err := unix.Mount("none", union, "aufs", 0, opts); err != nil {
  			return
  		}
  		enableDirperm = true
  		if err := Unmount(union); err != nil {
  			logger.Errorf("error checking dirperm1: failed to unmount %v", err)
  		}
  	})
  	return enableDirperm
  }
docs: // useDirperm checks dirperm1 mount option can be used with the current
  // version of aufs.