aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/fuse/swarmfs_unix.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-08-15 00:44:17 +0800
committerGitHub <noreply@github.com>2017-08-15 00:44:17 +0800
commit2403656373f1250e3668227bd9fc94e6e95412b9 (patch)
tree53ddfebc6a77ea7b8a3f7ac81c58baa8168f729e /swarm/fuse/swarmfs_unix.go
parentef0edc6e32d98d2fca54076f38cb317f43704900 (diff)
parent133de3d80659680dc051065cb3baddd92a4e45c5 (diff)
downloadgo-tangerine-2403656373f1250e3668227bd9fc94e6e95412b9.tar
go-tangerine-2403656373f1250e3668227bd9fc94e6e95412b9.tar.gz
go-tangerine-2403656373f1250e3668227bd9fc94e6e95412b9.tar.bz2
go-tangerine-2403656373f1250e3668227bd9fc94e6e95412b9.tar.lz
go-tangerine-2403656373f1250e3668227bd9fc94e6e95412b9.tar.xz
go-tangerine-2403656373f1250e3668227bd9fc94e6e95412b9.tar.zst
go-tangerine-2403656373f1250e3668227bd9fc94e6e95412b9.zip
Merge pull request #14951 from egonelbre/megacheck_swarm
swarm: fix megacheck warnings
Diffstat (limited to 'swarm/fuse/swarmfs_unix.go')
-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)