Remove obsolete TODOs for b/38173783
The comments in the ticket indicate that this behavior is fine and that the ticket should be closed, so we shouldn't need pointers to the ticket. PiperOrigin-RevId: 306266071
This commit is contained in:
parent
445c366581
commit
6a4d17a31d
|
@ -127,10 +127,6 @@ func (logContext) Value(key interface{}) interface{} {
|
|||
var bgContext = &logContext{Logger: log.Log()}
|
||||
|
||||
// Background returns an empty context using the default logger.
|
||||
//
|
||||
// Users should be wary of using a Background context. Please tag any use with
|
||||
// FIXME(b/38173783) and a note to remove this use.
|
||||
//
|
||||
// Generally, one should use the Task as their context when available, or avoid
|
||||
// having to use a context in places where a Task is unavailable.
|
||||
//
|
||||
|
|
|
@ -97,7 +97,6 @@ func (s *Stack) Push(vals ...interface{}) (usermem.Addr, error) {
|
|||
if c < 0 {
|
||||
return 0, fmt.Errorf("bad binary.Size for %T", v)
|
||||
}
|
||||
// TODO(b/38173783): Use a real context.Context.
|
||||
n, err := usermem.CopyObjectOut(context.Background(), s.IO, s.Bottom-usermem.Addr(c), norm, usermem.IOOpts{})
|
||||
if err != nil || c != n {
|
||||
return 0, err
|
||||
|
@ -121,11 +120,9 @@ func (s *Stack) Pop(vals ...interface{}) (usermem.Addr, error) {
|
|||
var err error
|
||||
if isVaddr {
|
||||
value := s.Arch.Native(uintptr(0))
|
||||
// TODO(b/38173783): Use a real context.Context.
|
||||
n, err = usermem.CopyObjectIn(context.Background(), s.IO, s.Bottom, value, usermem.IOOpts{})
|
||||
*vaddr = usermem.Addr(s.Arch.Value(value))
|
||||
} else {
|
||||
// TODO(b/38173783): Use a real context.Context.
|
||||
n, err = usermem.CopyObjectIn(context.Background(), s.IO, s.Bottom, v, usermem.IOOpts{})
|
||||
}
|
||||
if err != nil {
|
||||
|
|
|
@ -34,7 +34,6 @@ func (f *fileOperations) afterLoad() {
|
|||
flags := f.flags
|
||||
flags.Truncate = false
|
||||
|
||||
// TODO(b/38173783): Context is not plumbed to save/restore.
|
||||
f.handles, err = f.inodeOperations.fileState.getHandles(context.Background(), flags, f.inodeOperations.cachingInodeOps)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to re-open handle: %v", err)
|
||||
|
|
|
@ -57,7 +57,6 @@ func (h *handles) DecRef() {
|
|||
}
|
||||
}
|
||||
}
|
||||
// FIXME(b/38173783): Context is not plumbed here.
|
||||
if err := h.File.close(context.Background()); err != nil {
|
||||
log.Warningf("error closing p9 file: %v", err)
|
||||
}
|
||||
|
|
|
@ -123,7 +123,6 @@ func (i *inodeFileState) afterLoad() {
|
|||
// beforeSave.
|
||||
return fmt.Errorf("failed to find path for inode number %d. Device %s contains %s", i.sattr.InodeID, i.s.connID, fs.InodeMappings(i.s.inodeMappings))
|
||||
}
|
||||
// TODO(b/38173783): Context is not plumbed to save/restore.
|
||||
ctx := &dummyClockContext{context.Background()}
|
||||
|
||||
_, i.file, err = i.s.attach.walk(ctx, splitAbsolutePath(name))
|
||||
|
|
|
@ -104,7 +104,6 @@ func (s *session) afterLoad() {
|
|||
// If private unix sockets are enabled, create and fill the session's endpoint
|
||||
// maps.
|
||||
if opts.privateunixsocket {
|
||||
// TODO(b/38173783): Context is not plumbed to save/restore.
|
||||
ctx := &dummyClockContext{context.Background()}
|
||||
|
||||
if err = s.restoreEndpointMaps(ctx); err != nil {
|
||||
|
|
|
@ -102,7 +102,6 @@ func (i *Inode) DecRef() {
|
|||
|
||||
// destroy releases the Inode and releases the msrc reference taken.
|
||||
func (i *Inode) destroy() {
|
||||
// FIXME(b/38173783): Context is not plumbed here.
|
||||
ctx := context.Background()
|
||||
if err := i.WriteOut(ctx); err != nil {
|
||||
// FIXME(b/65209558): Mark as warning again once noatime is
|
||||
|
|
|
@ -461,7 +461,7 @@ func (s *Shm) AddMapping(ctx context.Context, _ memmap.MappingSpace, _ usermem.A
|
|||
func (s *Shm) RemoveMapping(ctx context.Context, _ memmap.MappingSpace, _ usermem.AddrRange, _ uint64, _ bool) {
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
// TODO(b/38173783): RemoveMapping may be called during task exit, when ctx
|
||||
// RemoveMapping may be called during task exit, when ctx
|
||||
// is context.Background. Gracefully handle missing clocks. Failing to
|
||||
// update the detach time in these cases is ok, since no one can observe the
|
||||
// omission.
|
||||
|
|
|
@ -58,7 +58,6 @@ func (tc *TaskContext) release() {
|
|||
// Nil out pointers so that if the task is saved after release, it doesn't
|
||||
// follow the pointers to possibly now-invalid objects.
|
||||
if tc.MemoryManager != nil {
|
||||
// TODO(b/38173783)
|
||||
tc.MemoryManager.DecUsers(context.Background())
|
||||
tc.MemoryManager = nil
|
||||
}
|
||||
|
|
|
@ -513,8 +513,6 @@ func (t *Task) canReceiveSignalLocked(sig linux.Signal) bool {
|
|||
if t.stop != nil {
|
||||
return false
|
||||
}
|
||||
// - TODO(b/38173783): No special case for when t is also the sending task,
|
||||
// because the identity of the sender is unknown.
|
||||
// - Do not choose tasks that have already been interrupted, as they may be
|
||||
// busy handling another signal.
|
||||
if len(t.interruptChan) != 0 {
|
||||
|
|
|
@ -29,9 +29,6 @@ import (
|
|||
)
|
||||
|
||||
// IO provides access to the contents of a virtual memory space.
|
||||
//
|
||||
// FIXME(b/38173783): Implementations of IO cannot expect ctx to contain any
|
||||
// meaningful data.
|
||||
type IO interface {
|
||||
// CopyOut copies len(src) bytes from src to the memory mapped at addr. It
|
||||
// returns the number of bytes copied. If the number of bytes copied is <
|
||||
|
|
Loading…
Reference in New Issue