mirror of
https://github.com/golang/go
synced 2024-11-23 08:30:05 -07:00
syscall: fs_nacl: Unlock() should be deferred.
Change-Id: Iea08b8f4e74a8cd4b4d317273046457c8db956a1 Reviewed-on: https://go-review.googlesource.com/1640 Reviewed-by: Minux Ma <minux@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
parent
ab9ec2e401
commit
47c7cf4357
@ -815,7 +815,7 @@ func fdToFsysFile(fd int) (*fsysFile, error) {
|
||||
// It is meant to be called when initializing the file system image.
|
||||
func create(name string, mode uint32, sec int64, data []byte) error {
|
||||
fs.mu.Lock()
|
||||
fs.mu.Unlock()
|
||||
defer fs.mu.Unlock()
|
||||
f, err := fs.open(name, O_CREATE|O_EXCL, mode)
|
||||
if err != nil {
|
||||
if mode&S_IFMT == S_IFDIR {
|
||||
|
Loading…
Reference in New Issue
Block a user