aufs: remove extra locking
Both mount and unmount calls are already protected by fine-grained (per id) locks in Get()/Put() introduced in commitfc1cf1911b
("Add more locking to storage drivers"), so there's no point in having a global lock in mount/unmount. The only place from which unmount is called without any locking is Cleanup() -- this is to be addressed in the next patch. This reverts commit824c24e680
. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> (cherry picked from commitf93750b2c4
)
This commit is contained in:
parent
5fbc0a16e2
commit
7d1414ec3e
1 changed files with 0 additions and 7 deletions
|
@ -72,7 +72,6 @@ func init() {
|
|||
|
||||
// Driver contains information about the filesystem mounted.
|
||||
type Driver struct {
|
||||
sync.Mutex
|
||||
root string
|
||||
uidMaps []idtools.IDMap
|
||||
gidMaps []idtools.IDMap
|
||||
|
@ -547,9 +546,6 @@ func (a *Driver) getParentLayerPaths(id string) ([]string, error) {
|
|||
}
|
||||
|
||||
func (a *Driver) mount(id string, target string, mountLabel string, layers []string) error {
|
||||
a.Lock()
|
||||
defer a.Unlock()
|
||||
|
||||
// If the id is mounted or we get an error return
|
||||
if mounted, err := a.mounted(target); err != nil || mounted {
|
||||
return err
|
||||
|
@ -564,9 +560,6 @@ func (a *Driver) mount(id string, target string, mountLabel string, layers []str
|
|||
}
|
||||
|
||||
func (a *Driver) unmount(mountPath string) error {
|
||||
a.Lock()
|
||||
defer a.Unlock()
|
||||
|
||||
if mounted, err := a.mounted(mountPath); err != nil || !mounted {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue