diff options
author | Matthew Heon <matthew.heon@pm.me> | 2019-01-10 15:40:56 -0500 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-01-10 15:41:19 -0500 |
commit | 76c57f55cacb7916ca451e378d181b1c30c94032 (patch) | |
tree | 775fafbd2dcefae1b1731744219dc2410e985800 /libpod/runtime_volume_linux.go | |
parent | 6e8aeab472154e2b1eff92683803d16af06d2b30 (diff) | |
download | podman-76c57f55cacb7916ca451e378d181b1c30c94032.tar.gz podman-76c57f55cacb7916ca451e378d181b1c30c94032.tar.bz2 podman-76c57f55cacb7916ca451e378d181b1c30c94032.zip |
Revert "Merge pull request #1235 from mheon/shm_locking"
This reverts commit bf5f779331870d31863c486619daae3fcea458eb, reversing
changes made to 6868b5aa1444404113bc6a4582203fbbf89490c2.
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/runtime_volume_linux.go')
-rw-r--r-- | libpod/runtime_volume_linux.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libpod/runtime_volume_linux.go b/libpod/runtime_volume_linux.go index 0727cfedf..5cc0938f0 100644 --- a/libpod/runtime_volume_linux.go +++ b/libpod/runtime_volume_linux.go @@ -8,6 +8,7 @@ import ( "path/filepath" "strings" + "github.com/containers/storage" "github.com/containers/storage/pkg/stringid" "github.com/opencontainers/selinux/go-selinux/label" "github.com/pkg/errors" @@ -67,12 +68,14 @@ func (r *Runtime) newVolume(ctx context.Context, options ...VolumeCreateOption) } volume.config.MountPoint = fullVolPath - lock, err := r.lockManager.AllocateLock() + // Path our lock file will reside at + lockPath := filepath.Join(r.lockDir, volume.config.Name) + // Grab a lockfile at the given path + lock, err := storage.GetLockfile(lockPath) if err != nil { - return nil, errors.Wrapf(err, "error allocating lock for new volume") + return nil, errors.Wrapf(err, "error creating lockfile for new volume") } volume.lock = lock - volume.config.LockID = volume.lock.ID() volume.valid = true |