fix mutex

This commit is contained in:
shoopea
2021-11-14 18:19:37 +08:00
parent d2e5b34b64
commit b511eecec3
2 changed files with 4 additions and 7 deletions

3
box.go
View File

@@ -78,9 +78,6 @@ func (b *Box) ZFSIsLastSnapshot(src Snapshot) (is bool, err error) {
return
}
b.zfs.M.Lock()
defer b.zfs.M.Unlock()
_, err = b.ZFSGetNextSnapshot(src)
if err != nil {
if err.Error() == "no snapshot" {