diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-07-17 18:23:01 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-07-17 18:23:01 +0000 |
commit | 67b38012014bbc8774e04dd2942d6111b8e9f401 (patch) | |
tree | c70c44195eb6059f53972c7e9ba9611a49d608b9 /pkg/sentry/fs/inode_overlay.go | |
parent | 7126e351b80d9826a7b0eb29ad85d8036d311d54 (diff) | |
parent | ca829158e385c591d4be21c87cc6ab45116a7cce (diff) |
Merge ca829158 (automated)
Diffstat (limited to 'pkg/sentry/fs/inode_overlay.go')
-rw-r--r-- | pkg/sentry/fs/inode_overlay.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pkg/sentry/fs/inode_overlay.go b/pkg/sentry/fs/inode_overlay.go index 24b769cfc..e0602da17 100644 --- a/pkg/sentry/fs/inode_overlay.go +++ b/pkg/sentry/fs/inode_overlay.go @@ -339,7 +339,9 @@ func overlayRemove(ctx context.Context, o *overlayEntry, parent *Dirent, child * } } if child.Inode.overlay.lowerExists { - return overlayCreateWhiteout(o.upper, child.name) + if err := overlayCreateWhiteout(o.upper, child.name); err != nil { + return err + } } // We've removed from the directory so we must drop the cache. o.markDirectoryDirty() @@ -418,10 +420,12 @@ func overlayRename(ctx context.Context, o *overlayEntry, oldParent *Dirent, rena return err } if renamed.Inode.overlay.lowerExists { - return overlayCreateWhiteout(oldParent.Inode.overlay.upper, oldName) + if err := overlayCreateWhiteout(oldParent.Inode.overlay.upper, oldName); err != nil { + return err + } } // We've changed the directory so we must drop the cache. - o.markDirectoryDirty() + oldParent.Inode.overlay.markDirectoryDirty() return nil } |