diff options
author | Jamie Liu <jamieliu@google.com> | 2020-05-14 20:08:25 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-05-14 20:09:55 -0700 |
commit | fb7e5f1676ad9e6e7e83312e09fe55f91ade41bc (patch) | |
tree | c2f6e06ca12a6eebd35f246f1c810957cb549690 /pkg/sentry/fsimpl/gofer/gofer.go | |
parent | 326abf5e3643f954a295a8bbfaa6f6a47db59767 (diff) |
Make utimes_test pass on VFS2.
PiperOrigin-RevId: 311657502
Diffstat (limited to 'pkg/sentry/fsimpl/gofer/gofer.go')
-rw-r--r-- | pkg/sentry/fsimpl/gofer/gofer.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/fsimpl/gofer/gofer.go b/pkg/sentry/fsimpl/gofer/gofer.go index 353e2cf5b..ebf063a58 100644 --- a/pkg/sentry/fsimpl/gofer/gofer.go +++ b/pkg/sentry/fsimpl/gofer/gofer.go @@ -869,8 +869,8 @@ func (d *dentry) setStat(ctx context.Context, creds *auth.Credentials, stat *lin Size: stat.Mask&linux.STATX_SIZE != 0, ATime: stat.Mask&linux.STATX_ATIME != 0, MTime: stat.Mask&linux.STATX_MTIME != 0, - ATimeNotSystemTime: stat.Atime.Nsec != linux.UTIME_NOW, - MTimeNotSystemTime: stat.Mtime.Nsec != linux.UTIME_NOW, + ATimeNotSystemTime: stat.Mask&linux.STATX_ATIME != 0 && stat.Atime.Nsec != linux.UTIME_NOW, + MTimeNotSystemTime: stat.Mask&linux.STATX_MTIME != 0 && stat.Mtime.Nsec != linux.UTIME_NOW, }, p9.SetAttr{ Permissions: p9.FileMode(stat.Mode), UID: p9.UID(stat.UID), |