mirror of https://github.com/restic/restic.git
repository/repository - fix unused sync.Mutex m
This commit is contained in:
parent
8e71a92976
commit
d794e41252
|
@ -54,7 +54,6 @@ type Repository struct {
|
||||||
|
|
||||||
maxRepoCapReached bool
|
maxRepoCapReached bool
|
||||||
maxRepoMutex sync.Mutex
|
maxRepoMutex sync.Mutex
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// internalRepository allows using SaveUnpacked and RemoveUnpacked with all FileTypes
|
// internalRepository allows using SaveUnpacked and RemoveUnpacked with all FileTypes
|
||||||
|
@ -399,8 +398,6 @@ func (r *Repository) saveAndEncrypt(ctx context.Context, t restic.BlobType, data
|
||||||
|
|
||||||
length, err := pm.SaveBlob(ctx, t, id, ciphertext, uncompressedLength)
|
length, err := pm.SaveBlob(ctx, t, id, ciphertext, uncompressedLength)
|
||||||
|
|
||||||
var m sync.Mutex
|
|
||||||
|
|
||||||
// maximum repository capacity exceeded?
|
// maximum repository capacity exceeded?
|
||||||
r.maxRepoMutex.Lock()
|
r.maxRepoMutex.Lock()
|
||||||
defer r.maxRepoMutex.Unlock()
|
defer r.maxRepoMutex.Unlock()
|
||||||
|
|
Loading…
Reference in New Issue