summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/vfs/epoll.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-12-03 14:26:57 +0000
committergVisor bot <gvisor-bot@google.com>2020-12-03 14:26:57 +0000
commitb90360c0c293247f6e755e937ef518c1a9e0d2df (patch)
tree270a799d3b616e8648be3c22db446eb7ab9ee51c /pkg/sentry/vfs/epoll.go
parent194d07eeb5e3f0708fbfe4afd0d4d7dadd364863 (diff)
parent6f60a2b0a27a742690aa6acd5df1912ccb5fc8d3 (diff)
Merge release-20201130.0-30-g6f60a2b0a (automated)
Diffstat (limited to 'pkg/sentry/vfs/epoll.go')
-rw-r--r--pkg/sentry/vfs/epoll.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/sentry/vfs/epoll.go b/pkg/sentry/vfs/epoll.go
index a98aac52b..072655fe8 100644
--- a/pkg/sentry/vfs/epoll.go
+++ b/pkg/sentry/vfs/epoll.go
@@ -204,8 +204,8 @@ func (ep *EpollInstance) AddInterest(file *FileDescription, num int32, event lin
file.EventRegister(&epi.waiter, wmask)
// Check if the file is already ready.
- if file.Readiness(wmask)&wmask != 0 {
- epi.Callback(nil)
+ if m := file.Readiness(wmask) & wmask; m != 0 {
+ epi.Callback(nil, m)
}
// Add epi to file.epolls so that it is removed when the last
@@ -274,8 +274,8 @@ func (ep *EpollInstance) ModifyInterest(file *FileDescription, num int32, event
file.EventRegister(&epi.waiter, wmask)
// Check if the file is already ready with the new mask.
- if file.Readiness(wmask)&wmask != 0 {
- epi.Callback(nil)
+ if m := file.Readiness(wmask) & wmask; m != 0 {
+ epi.Callback(nil, m)
}
return nil
@@ -311,7 +311,7 @@ func (ep *EpollInstance) DeleteInterest(file *FileDescription, num int32) error
}
// Callback implements waiter.EntryCallback.Callback.
-func (epi *epollInterest) Callback(*waiter.Entry) {
+func (epi *epollInterest) Callback(*waiter.Entry, waiter.EventMask) {
newReady := false
epi.epoll.mu.Lock()
if !epi.ready {