remove duplicated tx rollback

Signed-off-by: guodong <guodong9211@gmail.com>
This commit is contained in:
guodong 2022-11-19 13:56:23 +08:00
parent b9db5673f4
commit bf777a70b1

View File

@ -456,9 +456,6 @@ func (o *snapshotter) createSnapshot(ctx context.Context, kind snapshots.Kind, k
stat := st.Sys().(*syscall.Stat_t)
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)
}
}