From 9da77d00fa682ff504c7ff549985f78b0574c79b Mon Sep 17 00:00:00 2001 From: Fabricio Voznika Date: Tue, 18 Aug 2020 18:51:19 -0700 Subject: Don't set atime if mount is readonly Updates #1035 PiperOrigin-RevId: 327351475 --- pkg/sentry/fsimpl/gofer/time.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/sentry/fsimpl/gofer') diff --git a/pkg/sentry/fsimpl/gofer/time.go b/pkg/sentry/fsimpl/gofer/time.go index 2cb8191b9..e59d07e90 100644 --- a/pkg/sentry/fsimpl/gofer/time.go +++ b/pkg/sentry/fsimpl/gofer/time.go @@ -38,7 +38,7 @@ func statxTimestampFromDentry(ns int64) linux.StatxTimestamp { // Preconditions: d.cachedMetadataAuthoritative() == true. func (d *dentry) touchAtime(mnt *vfs.Mount) { - if mnt.Flags.NoATime { + if mnt.Flags.NoATime || mnt.ReadOnly() { return } if err := mnt.CheckBeginWrite(); err != nil { -- cgit v1.2.3