Commit f52a93f2 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Run gofmt.

parent ae23e54c
...@@ -77,7 +77,6 @@ func (me *FileSystemConnector) verify() { ...@@ -77,7 +77,6 @@ func (me *FileSystemConnector) verify() {
root.verify(me.rootNode.mountPoint) root.verify(me.rootNode.mountPoint)
} }
// createChild() creates a child for given as FsNode as child of 'parent'. The // createChild() creates a child for given as FsNode as child of 'parent'. The
// resulting inode will have its lookupCount incremented. // resulting inode will have its lookupCount incremented.
func (me *FileSystemConnector) createChild(parent *Inode, name string, fi *os.FileInfo, fsi FsNode) (out *EntryOut) { func (me *FileSystemConnector) createChild(parent *Inode, name string, fi *os.FileInfo, fsi FsNode) (out *EntryOut) {
...@@ -124,7 +123,6 @@ func (me *FileSystemConnector) lookupUpdate(node *Inode) { ...@@ -124,7 +123,6 @@ func (me *FileSystemConnector) lookupUpdate(node *Inode) {
node.lookupCount += 1 node.lookupCount += 1
} }
// Must run outside treeLock. // Must run outside treeLock.
// //
// TODO - reconcile api for lookupUpdate() and forgetUpdate(). // TODO - reconcile api for lookupUpdate() and forgetUpdate().
......
...@@ -18,7 +18,6 @@ type openedFile struct { ...@@ -18,7 +18,6 @@ type openedFile struct {
dir rawDir dir rawDir
} }
type fileSystemMount struct { type fileSystemMount struct {
// The file system we mounted here. // The file system we mounted here.
fs NodeFileSystem fs NodeFileSystem
......
...@@ -59,7 +59,6 @@ func (me *FileSystemConnector) internalLookup(parent *Inode, name string, contex ...@@ -59,7 +59,6 @@ func (me *FileSystemConnector) internalLookup(parent *Inode, name string, contex
return me.postLookup(fi, fsNode, code, getattrNode, lookupNode, name) return me.postLookup(fi, fsNode, code, getattrNode, lookupNode, name)
} }
// Prepare for lookup: we are either looking for getattr of an // Prepare for lookup: we are either looking for getattr of an
// existing node, or lookup a new one. Here we decide which of those // existing node, or lookup a new one. Here we decide which of those
func (me *FileSystemConnector) preLookup(parent *Inode, name string) (lookupNode *Inode, attrNode *Inode) { func (me *FileSystemConnector) preLookup(parent *Inode, name string) (lookupNode *Inode, attrNode *Inode) {
......
...@@ -79,7 +79,6 @@ func (me *portableHandleMap) Decode(h uint64) *Handled { ...@@ -79,7 +79,6 @@ func (me *portableHandleMap) Decode(h uint64) *Handled {
return me.handles[h] return me.handles[h]
} }
func (me *portableHandleMap) Forget(h uint64) *Handled { func (me *portableHandleMap) Forget(h uint64) *Handled {
me.Lock() me.Lock()
defer me.Unlock() defer me.Unlock()
...@@ -95,7 +94,6 @@ func (me *portableHandleMap) Has(h uint64) bool { ...@@ -95,7 +94,6 @@ func (me *portableHandleMap) Has(h uint64) bool {
return me.handles[h] != nil return me.handles[h] != nil
} }
// 32 bits version of HandleMap // 32 bits version of HandleMap
type int32HandleMap struct { type int32HandleMap struct {
mutex sync.Mutex mutex sync.Mutex
...@@ -132,7 +130,6 @@ func (me *int32HandleMap) Forget(handle uint64) *Handled { ...@@ -132,7 +130,6 @@ func (me *int32HandleMap) Forget(handle uint64) *Handled {
return val return val
} }
func (me *int32HandleMap) Decode(handle uint64) *Handled { func (me *int32HandleMap) Decode(handle uint64) *Handled {
val := (*Handled)(unsafe.Pointer(uintptr(handle & ((1 << 32) - 1)))) val := (*Handled)(unsafe.Pointer(uintptr(handle & ((1 << 32) - 1))))
return val return val
......
...@@ -119,4 +119,3 @@ func TestHandleMapCheckFail(t *testing.T) { ...@@ -119,4 +119,3 @@ func TestHandleMapCheckFail(t *testing.T) {
hm.Decode(h | (uint64(1) << 63)) hm.Decode(h | (uint64(1) << 63))
t.Error("Borked decode did not panic") t.Error("Borked decode did not panic")
} }
...@@ -128,7 +128,6 @@ func (me *Inode) IsDir() bool { ...@@ -128,7 +128,6 @@ func (me *Inode) IsDir() bool {
return me.children != nil return me.children != nil
} }
// CreateChild() creates node for synthetic use // CreateChild() creates node for synthetic use
func (me *Inode) CreateChild(name string, isDir bool, fsi FsNode) *Inode { func (me *Inode) CreateChild(name string, isDir bool, fsi FsNode) *Inode {
me.treeLock.Lock() me.treeLock.Lock()
......
...@@ -736,7 +736,7 @@ func TestUmask(t *testing.T) { ...@@ -736,7 +736,7 @@ func TestUmask(t *testing.T) {
defer ts.Cleanup() defer ts.Cleanup()
// Make sure system setting does not affect test. // Make sure system setting does not affect test.
fn := ts.mnt+"/file" fn := ts.mnt + "/file"
mask := 020 mask := 020
cmd := exec.Command("/bin/sh", "-c", cmd := exec.Command("/bin/sh", "-c",
fmt.Sprintf("umask %o && mkdir %s", mask, fn)) fmt.Sprintf("umask %o && mkdir %s", mask, fn))
......
...@@ -952,4 +952,3 @@ func (me *UnionFsFile) GetAttr() (*os.FileInfo, fuse.Status) { ...@@ -952,4 +952,3 @@ func (me *UnionFsFile) GetAttr() (*os.FileInfo, fuse.Status) {
} }
return fi, code return fi, code
} }
...@@ -993,7 +993,7 @@ func TestStatFs(t *testing.T) { ...@@ -993,7 +993,7 @@ func TestStatFs(t *testing.T) {
defer clean() defer clean()
s1 := syscall.Statfs_t{} s1 := syscall.Statfs_t{}
err := syscall.Statfs(wd + "/mount", &s1) err := syscall.Statfs(wd+"/mount", &s1)
if err != 0 { if err != 0 {
t.Fatal("statfs mnt", err) t.Fatal("statfs mnt", err)
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment