mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Plumbing context.Context to DecRef() and Release().
context is passed to DecRef() and Release() which is needed for SO_LINGER implementation. PiperOrigin-RevId: 324672584
This commit is contained in:
committed by
gVisor bot
parent
ef11bb936b
commit
b2ae7ea1bb
@@ -50,7 +50,7 @@ func importFS(ctx context.Context, fdTable *kernel.FDTable, console bool, fds []
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer appFile.DecRef()
|
||||
defer appFile.DecRef(ctx)
|
||||
|
||||
// Remember this in the TTY file, as we will
|
||||
// use it for the other stdio FDs.
|
||||
@@ -69,7 +69,7 @@ func importFS(ctx context.Context, fdTable *kernel.FDTable, console bool, fds []
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer appFile.DecRef()
|
||||
defer appFile.DecRef(ctx)
|
||||
}
|
||||
|
||||
// Add the file to the FD map.
|
||||
@@ -102,7 +102,7 @@ func importVFS2(ctx context.Context, fdTable *kernel.FDTable, console bool, stdi
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer appFile.DecRef()
|
||||
defer appFile.DecRef(ctx)
|
||||
|
||||
// Remember this in the TTY file, as we will use it for the other stdio
|
||||
// FDs.
|
||||
@@ -119,7 +119,7 @@ func importVFS2(ctx context.Context, fdTable *kernel.FDTable, console bool, stdi
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer appFile.DecRef()
|
||||
defer appFile.DecRef(ctx)
|
||||
}
|
||||
|
||||
if err := fdTable.NewFDAtVFS2(ctx, int32(appFD), appFile, kernel.FDFlags{}); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user