Commit Graph

3 Commits

Author SHA1 Message Date
Justas Brazauskas 927b334ebf Fix typos found across repository
Signed-off-by: Justas Brazauskas <brazauskasjustas@gmail.com>
2015-12-13 18:04:12 +02:00
Brian Goff 985175fd8f Fix race in locker call to `dec()`
Can't safely use uint32 for locker since we need to decrement the count,
which requires loading the unit and doing some math, which is inherintly
racey.
Instead use Int32 which we can safely use with atomic and AddInt32 with
`-1`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-11-24 11:59:09 -05:00
Brian Goff fe66fdd18c Fix potential races in the volume store
Uses finer grained locking so that each volume name gets its own lock
rather than only being protected by the global lock, which itself needs
to be unlocked during cetain operations (`create` especially`)

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-11-04 16:59:47 -05:00