use GlobalContext whenever possible (#9280)

This change is throughout the codebase to
ensure that all codepaths honor GlobalContext
This commit is contained in:
Harshavardhana
2020-04-09 09:30:02 -07:00
committed by GitHub
parent 1b45be0d60
commit f44cfb2863
76 changed files with 374 additions and 409 deletions
+2 -2
View File
@@ -121,7 +121,7 @@ func initMetaVolumeFS(fsPath, fsUUID string) error {
// NewFSObjectLayer - initialize new fs object layer.
func NewFSObjectLayer(fsPath string) (ObjectLayer, error) {
ctx := context.Background()
ctx := GlobalContext
if fsPath == "" {
return nil, errInvalidArgument
}
@@ -1089,7 +1089,7 @@ func (fs *FSObjects) listDirFactory() ListDirFunc {
var err error
entries, err = readDir(pathJoin(fs.fsPath, bucket, prefixDir))
if err != nil && err != errFileNotFound {
logger.LogIf(context.Background(), err)
logger.LogIf(GlobalContext, err)
return false, nil
}
if len(entries) == 0 {