Fix FDTable.NewFDVFS2

It was looking at VFS1 table to determine where to
allocate the next FD from.

Updates #1035

PiperOrigin-RevId: 301678858
This commit is contained in:
Fabricio Voznika
2020-03-18 15:13:42 -07:00
committed by gVisor bot
parent fc16e64396
commit f1d1af2a4a
+1 -1
View File
@@ -338,7 +338,7 @@ func (f *FDTable) NewFDVFS2(ctx context.Context, minfd int32, file *vfs.FileDesc
fd = f.next
}
for fd < end {
if d, _, _ := f.get(fd); d == nil {
if d, _, _ := f.getVFS2(fd); d == nil {
f.setVFS2(fd, file, flags)
if fd == f.next {
// Update next search start position.