diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-07-02 02:52:10 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-07-02 02:52:10 +0000 |
commit | d4091add4ab3c58108e999ff3ceca49278e3bccb (patch) | |
tree | d3a92b63ceaaa1a823f02c7be2bbcf5ed1d57e7e /pkg/sentry/fsimpl/gofer/time.go | |
parent | 9325ff64d7d60ca528b9a8a23fb534d12ad9f864 (diff) | |
parent | 52b44719d6e14ec299d0d953b4dc07a712b897fa (diff) |
Merge release-20200622.1-57-g52b44719d (automated)
Diffstat (limited to 'pkg/sentry/fsimpl/gofer/time.go')
-rw-r--r-- | pkg/sentry/fsimpl/gofer/time.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/pkg/sentry/fsimpl/gofer/time.go b/pkg/sentry/fsimpl/gofer/time.go index 1d5aa82dc..0eef4e16e 100644 --- a/pkg/sentry/fsimpl/gofer/time.go +++ b/pkg/sentry/fsimpl/gofer/time.go @@ -36,7 +36,7 @@ func statxTimestampFromDentry(ns int64) linux.StatxTimestamp { } } -// Preconditions: fs.interop != InteropModeShared. +// Preconditions: d.cachedMetadataAuthoritative() == true. func (d *dentry) touchAtime(mnt *vfs.Mount) { if mnt.Flags.NoATime { return @@ -51,8 +51,8 @@ func (d *dentry) touchAtime(mnt *vfs.Mount) { mnt.EndWrite() } -// Preconditions: fs.interop != InteropModeShared. The caller has successfully -// called vfs.Mount.CheckBeginWrite(). +// Preconditions: d.cachedMetadataAuthoritative() == true. The caller has +// successfully called vfs.Mount.CheckBeginWrite(). func (d *dentry) touchCtime() { now := d.fs.clock.Now().Nanoseconds() d.metadataMu.Lock() @@ -60,8 +60,8 @@ func (d *dentry) touchCtime() { d.metadataMu.Unlock() } -// Preconditions: fs.interop != InteropModeShared. The caller has successfully -// called vfs.Mount.CheckBeginWrite(). +// Preconditions: d.cachedMetadataAuthoritative() == true. The caller has +// successfully called vfs.Mount.CheckBeginWrite(). func (d *dentry) touchCMtime() { now := d.fs.clock.Now().Nanoseconds() d.metadataMu.Lock() @@ -70,6 +70,8 @@ func (d *dentry) touchCMtime() { d.metadataMu.Unlock() } +// Preconditions: d.cachedMetadataAuthoritative() == true. The caller has +// locked d.metadataMu. func (d *dentry) touchCMtimeLocked() { now := d.fs.clock.Now().Nanoseconds() atomic.StoreInt64(&d.mtime, now) |