aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/fuse
diff options
context:
space:
mode:
authorEgon Elbre <egonelbre@gmail.com>2017-08-09 01:34:35 +0800
committerEgon Elbre <egonelbre@gmail.com>2017-08-14 23:12:37 +0800
commit133de3d80659680dc051065cb3baddd92a4e45c5 (patch)
treecc67ede99634e335f8a07a5b0b084877cb8282d7 /swarm/fuse
parent6ca59d98f88d4b4cc8bdeb2f023ff8c1fa228c6f (diff)
downloadgo-tangerine-133de3d80659680dc051065cb3baddd92a4e45c5.tar
go-tangerine-133de3d80659680dc051065cb3baddd92a4e45c5.tar.gz
go-tangerine-133de3d80659680dc051065cb3baddd92a4e45c5.tar.bz2
go-tangerine-133de3d80659680dc051065cb3baddd92a4e45c5.tar.lz
go-tangerine-133de3d80659680dc051065cb3baddd92a4e45c5.tar.xz
go-tangerine-133de3d80659680dc051065cb3baddd92a4e45c5.tar.zst
go-tangerine-133de3d80659680dc051065cb3baddd92a4e45c5.zip
swarm: fix megacheck warnings
Diffstat (limited to 'swarm/fuse')
-rw-r--r--swarm/fuse/swarmfs_unix.go13
1 files changed, 2 insertions, 11 deletions
diff --git a/swarm/fuse/swarmfs_unix.go b/swarm/fuse/swarmfs_unix.go
index 1a8390a4b..75742845a 100644
--- a/swarm/fuse/swarmfs_unix.go
+++ b/swarm/fuse/swarmfs_unix.go
@@ -59,14 +59,6 @@ type MountInfo struct {
lock *sync.RWMutex
}
-// Inode numbers need to be unique, they are used for caching inside fuse
-func newInode() uint64 {
- inodeLock.Lock()
- defer inodeLock.Unlock()
- inode += 1
- return inode
-}
-
func NewMountInfo(mhash, mpoint string, sapi *api.Api) *MountInfo {
newMountInfo := &MountInfo{
MountPoint: mpoint,
@@ -103,7 +95,7 @@ func (self *SwarmFS) Mount(mhash, mountpoint string) (*MountInfo, error) {
}
log.Info(fmt.Sprintf("Attempting to mount %s ", cleanedMountPoint))
- key, manifestEntryMap, err := self.swarmApi.BuildDirectoryTree(mhash, true)
+ _, manifestEntryMap, err := self.swarmApi.BuildDirectoryTree(mhash, true)
if err != nil {
return nil, err
}
@@ -116,8 +108,7 @@ func (self *SwarmFS) Mount(mhash, mountpoint string) (*MountInfo, error) {
mi.rootDir = rootDir
for suffix, entry := range manifestEntryMap {
-
- key = common.Hex2Bytes(entry.Hash)
+ key := common.Hex2Bytes(entry.Hash)
fullpath := "/" + suffix
basepath := filepath.Dir(fullpath)