Fix aio eventfd lookup

We're failing to set eventFile in the outer scope.

PiperOrigin-RevId: 204392995
Change-Id: Ib9b04f839599ef552d7b5951d08223e2b1d5f6ad
This commit is contained in:
Michael Pratt 2018-07-12 17:13:41 -07:00 committed by Shentubot
parent 1cd46c8dd1
commit a28b274abb
1 changed files with 1 additions and 1 deletions

View File

@ -300,7 +300,7 @@ func submitCallback(t *kernel.Task, id uint64, cb *ioCallback, cbAddr usermem.Ad
// Was there an eventFD? Extract it.
var eventFile *fs.File
if cb.Flags&_IOCB_FLAG_RESFD != 0 {
eventFile := t.FDMap().GetFile(kdefs.FD(cb.ResFD))
eventFile = t.FDMap().GetFile(kdefs.FD(cb.ResFD))
if eventFile == nil {
// Bad FD.
return syserror.EBADF