remove duplicated tx rollback
Signed-off-by: guodong <guodong9211@gmail.com>
This commit is contained in:
parent
b9db5673f4
commit
bf777a70b1
@ -456,9 +456,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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user