Merge pull request #7700 from jellor/remove-rollback

This commit is contained in:
Samuel Karp 2022-11-20 23:13:49 -08:00 committed by GitHub
commit 59f210d8ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -455,9 +455,6 @@ func (o *snapshotter) createSnapshot(ctx context.Context, kind snapshots.Kind, k
stat := st.Sys().(*syscall.Stat_t) stat := st.Sys().(*syscall.Stat_t)
if err := os.Lchown(filepath.Join(td, "fs"), int(stat.Uid), int(stat.Gid)); err != nil { if err := os.Lchown(filepath.Join(td, "fs"), int(stat.Uid), int(stat.Gid)); err != nil {
if rerr := t.Rollback(); rerr != nil {
log.G(ctx).WithError(rerr).Warn("failed to rollback transaction")
}
return nil, fmt.Errorf("failed to chown: %w", err) return nil, fmt.Errorf("failed to chown: %w", err)
} }
} }