diff options
| author | chrislu <chris.lu@gmail.com> | 2022-05-24 18:52:04 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-05-24 18:52:04 -0700 |
| commit | 5b8b0229858dd4a85c31ece162d48e304efbfc4e (patch) | |
| tree | ffb7e5fe358b1fa00e3d8c8a61d804efa652ae3f /weed/mount/meta_cache | |
| parent | df50afc64270f1728a349d28f16dd5cab9eb5073 (diff) | |
| download | seaweedfs-5b8b0229858dd4a85c31ece162d48e304efbfc4e.tar.xz seaweedfs-5b8b0229858dd4a85c31ece162d48e304efbfc4e.zip | |
remove unused parameter
Diffstat (limited to 'weed/mount/meta_cache')
| -rw-r--r-- | weed/mount/meta_cache/meta_cache_init.go | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/weed/mount/meta_cache/meta_cache_init.go b/weed/mount/meta_cache/meta_cache_init.go index 4ef1757d1..f360f1f2b 100644 --- a/weed/mount/meta_cache/meta_cache_init.go +++ b/weed/mount/meta_cache/meta_cache_init.go @@ -10,7 +10,7 @@ import ( "github.com/chrislusf/seaweedfs/weed/util" ) -func EnsureVisited(mc *MetaCache, client filer_pb.FilerClient, dirPath util.FullPath, entryChan chan *filer.Entry) error { +func EnsureVisited(mc *MetaCache, client filer_pb.FilerClient, dirPath util.FullPath) error { currentPath := dirPath @@ -22,14 +22,8 @@ func EnsureVisited(mc *MetaCache, client filer_pb.FilerClient, dirPath util.Full return nil } - if entryChan != nil && dirPath == currentPath { - if err := doEnsureVisited(mc, client, currentPath, entryChan); err != nil { - return err - } - } else { - if err := doEnsureVisited(mc, client, currentPath, nil); err != nil { - return err - } + if err := doEnsureVisited(mc, client, currentPath); err != nil { + return err } // continue to parent directory @@ -45,7 +39,7 @@ func EnsureVisited(mc *MetaCache, client filer_pb.FilerClient, dirPath util.Full } -func doEnsureVisited(mc *MetaCache, client filer_pb.FilerClient, path util.FullPath, entryChan chan *filer.Entry) error { +func doEnsureVisited(mc *MetaCache, client filer_pb.FilerClient, path util.FullPath) error { glog.V(4).Infof("ReadDirAllEntries %s ...", path) @@ -59,9 +53,6 @@ func doEnsureVisited(mc *MetaCache, client filer_pb.FilerClient, path util.FullP glog.V(0).Infof("read %s: %v", entry.FullPath, err) return err } - if entryChan != nil { - entryChan <- entry - } return nil }) }) |
