Update containerd/fifo for race fix

Re-vendor containerd/fifo to pick up PR #13 to fix data race.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
This commit is contained in:
Phil Estes 2017-07-14 15:42:44 -04:00
parent 56a4023a19
commit 5e594d035d
No known key found for this signature in database
GPG Key ID: 0F386284C03A1162
2 changed files with 10 additions and 5 deletions

View File

@ -21,7 +21,7 @@ github.com/containerd/btrfs e9c546f46bccffefe71a6bc137e4c21b5503cc18
github.com/stretchr/testify v1.1.4
github.com/davecgh/go-spew v1.1.0
github.com/pmezard/go-difflib v1.0.0
github.com/containerd/fifo 69b99525e472735860a5269b75af1970142b3062
github.com/containerd/fifo fbfb6a11ec671efbe94ad1c12c2e98773f19e1e6
github.com/urfave/cli 8ba6f23b6e36d03666a14bd9421f5e3efcb59aca
golang.org/x/net 7dcfb8076726a3fdd9353b6b8a1f1b6be6811bd6
google.golang.org/grpc v1.3.0

View File

@ -15,6 +15,7 @@ const O_PATH = 010000000
type handle struct {
f *os.File
fd uintptr
dev uint64
ino uint64
closeOnce sync.Once
@ -27,10 +28,13 @@ func getHandle(fn string) (*handle, error) {
return nil, errors.Wrapf(err, "failed to open %v with O_PATH", fn)
}
var stat syscall.Stat_t
if err := syscall.Fstat(int(f.Fd()), &stat); err != nil {
var (
stat syscall.Stat_t
fd = f.Fd()
)
if err := syscall.Fstat(int(fd), &stat); err != nil {
f.Close()
return nil, errors.Wrapf(err, "failed to stat handle %v", f.Fd())
return nil, errors.Wrapf(err, "failed to stat handle %v", fd)
}
h := &handle{
@ -38,6 +42,7 @@ func getHandle(fn string) (*handle, error) {
name: fn,
dev: uint64(stat.Dev),
ino: stat.Ino,
fd: fd,
}
// check /proc just in case
@ -50,7 +55,7 @@ func getHandle(fn string) (*handle, error) {
}
func (h *handle) procPath() string {
return fmt.Sprintf("/proc/self/fd/%d", h.f.Fd())
return fmt.Sprintf("/proc/self/fd/%d", h.fd)
}
func (h *handle) Name() string {