mirror of
https://github.com/containers/podman.git
synced 2025-12-13 10:28:48 +08:00
vendor: update containers/common
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
6
vendor/github.com/containers/storage/pkg/lockfile/lockfile.go
generated
vendored
6
vendor/github.com/containers/storage/pkg/lockfile/lockfile.go
generated
vendored
@@ -128,9 +128,8 @@ func GetROLockfile(path string) (Locker, error) {
|
||||
func (l *LockFile) Lock() {
|
||||
if l.ro {
|
||||
panic("can't take write lock on read-only lock file")
|
||||
} else {
|
||||
l.lock(writeLock)
|
||||
}
|
||||
l.lock(writeLock)
|
||||
}
|
||||
|
||||
// RLock locks the lockfile as a reader.
|
||||
@@ -142,9 +141,8 @@ func (l *LockFile) RLock() {
|
||||
func (l *LockFile) TryLock() error {
|
||||
if l.ro {
|
||||
panic("can't take write lock on read-only lock file")
|
||||
} else {
|
||||
return l.tryLock(writeLock)
|
||||
}
|
||||
return l.tryLock(writeLock)
|
||||
}
|
||||
|
||||
// TryRLock attempts to lock the lockfile as a reader.
|
||||
|
||||
Reference in New Issue
Block a user