summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/syscalls
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-08-03 19:39:49 +0000
committergVisor bot <gvisor-bot@google.com>2020-08-03 19:39:49 +0000
commit664a8b24842f962a2721d414cf034a4839015586 (patch)
treed94a44595be235cd172399021050095fcde7bc47 /pkg/sentry/syscalls
parentc974bd81d35d0b19df9528d123622412e6502a55 (diff)
parent1fbbc795ef8918006214032d96fa88b8a21e5e0a (diff)
Merge release-20200622.1-310-g1fbbc795e (automated)
Diffstat (limited to 'pkg/sentry/syscalls')
-rw-r--r--pkg/sentry/syscalls/linux/vfs2/setstat.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/pkg/sentry/syscalls/linux/vfs2/setstat.go b/pkg/sentry/syscalls/linux/vfs2/setstat.go
index 37fa56c19..25cdb7a55 100644
--- a/pkg/sentry/syscalls/linux/vfs2/setstat.go
+++ b/pkg/sentry/syscalls/linux/vfs2/setstat.go
@@ -254,11 +254,12 @@ func Fallocate(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.Sys
return 0, nil, syserror.EFBIG
}
- return 0, nil, file.Allocate(t, mode, uint64(offset), uint64(length))
+ if err := file.Allocate(t, mode, uint64(offset), uint64(length)); err != nil {
+ return 0, nil, err
+ }
- // File length modified, generate notification.
- // TODO(gvisor.dev/issue/1479): Reenable when Inotify is ported.
- // file.Dirent.InotifyEvent(linux.IN_MODIFY, 0)
+ file.Dentry().InotifyWithParent(linux.IN_MODIFY, 0, vfs.PathEvent)
+ return 0, nil, nil
}
// Utime implements Linux syscall utime(2).