diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-05-13 21:53:54 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-05-13 21:53:54 +0000 |
commit | 55d4eba501631e0117a1581c8b180479b06b3aa1 (patch) | |
tree | 204d834c55bb766fd8a997f952b8d57be647b1ac /runsc/fsgofer | |
parent | 92940b45fbf7f0d8ef283004468febed2dccaa8c (diff) | |
parent | 3894c9fcb92f36a03020b6dc13f1471b10eec029 (diff) |
Merge release-20210510.0-30-g3894c9fcb (automated)
Diffstat (limited to 'runsc/fsgofer')
-rw-r--r-- | runsc/fsgofer/fsgofer.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/runsc/fsgofer/fsgofer.go b/runsc/fsgofer/fsgofer.go index b81ede5ae..3f362b25e 100644 --- a/runsc/fsgofer/fsgofer.go +++ b/runsc/fsgofer/fsgofer.go @@ -1247,6 +1247,7 @@ func (l *localFile) MultiGetAttr(names []string) ([]p9.FullStat, error) { if parent != l.file.FD() { // Parent is no longer needed. _ = unix.Close(parent) + parent = -1 } if err != nil { if errors.Is(err, unix.ENOENT) { @@ -1275,5 +1276,8 @@ func (l *localFile) MultiGetAttr(names []string) ([]p9.FullStat, error) { } parent = child } + if parent != -1 && parent != l.file.FD() { + _ = unix.Close(parent) + } return stats, nil } |