diff options
author | Egon Elbre <egonelbre@gmail.com> | 2017-08-09 01:34:35 +0800 |
---|---|---|
committer | Egon Elbre <egonelbre@gmail.com> | 2017-08-14 23:12:37 +0800 |
commit | 133de3d80659680dc051065cb3baddd92a4e45c5 (patch) | |
tree | cc67ede99634e335f8a07a5b0b084877cb8282d7 /swarm/fuse/swarmfs_unix.go | |
parent | 6ca59d98f88d4b4cc8bdeb2f023ff8c1fa228c6f (diff) | |
download | dexon-133de3d80659680dc051065cb3baddd92a4e45c5.tar dexon-133de3d80659680dc051065cb3baddd92a4e45c5.tar.gz dexon-133de3d80659680dc051065cb3baddd92a4e45c5.tar.bz2 dexon-133de3d80659680dc051065cb3baddd92a4e45c5.tar.lz dexon-133de3d80659680dc051065cb3baddd92a4e45c5.tar.xz dexon-133de3d80659680dc051065cb3baddd92a4e45c5.tar.zst dexon-133de3d80659680dc051065cb3baddd92a4e45c5.zip |
swarm: fix megacheck warnings
Diffstat (limited to 'swarm/fuse/swarmfs_unix.go')
-rw-r--r-- | swarm/fuse/swarmfs_unix.go | 13 |
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) |