diff options
Diffstat (limited to 'pkg/sentry/fs/fsutil/inode.go')
-rw-r--r-- | pkg/sentry/fs/fsutil/inode.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/sentry/fs/fsutil/inode.go b/pkg/sentry/fs/fsutil/inode.go index 5e1bfeb58..a22b6ce9c 100644 --- a/pkg/sentry/fs/fsutil/inode.go +++ b/pkg/sentry/fs/fsutil/inode.go @@ -192,6 +192,16 @@ func (i *InodeSimpleAttributes) NotifyStatusChange(ctx context.Context) { i.mu.Unlock() } +// NotifyModificationAndStatusChange updates the modification and status change +// times. +func (i *InodeSimpleAttributes) NotifyModificationAndStatusChange(ctx context.Context) { + i.mu.Lock() + now := ktime.NowFromContext(ctx) + i.unstable.ModificationTime = now + i.unstable.StatusChangeTime = now + i.mu.Unlock() +} + // InodeSimpleExtendedAttributes implements // fs.InodeOperations.{Get,Set,List}xattr. // |