diff --git a/fuseops/common_op.go b/fuseops/common_op.go index c74ae0f..9dd6de5 100644 --- a/fuseops/common_op.go +++ b/fuseops/common_op.go @@ -53,7 +53,7 @@ type commonOp struct { // A function that is invoked with the error given to Respond, for use in // closing off traces and reporting back to the connection. - finish func(error) + finished func(error) } var gPIDMapMu sync.Mutex @@ -156,13 +156,13 @@ func (o *commonOp) init( op Op, bazilReq bazilfuse.Request, log func(int, string, ...interface{}), - finish func(error)) { + finished func(error)) { // Initialize basic fields. o.ctx = ctx o.op = op o.bazilReq = bazilReq o.log = log - o.finish = finish + o.finished = finished // Set up a context that reflects per-PID tracing if appropriate. o.ctx = o.maybeTraceByPID(o.ctx, int(bazilReq.Hdr().Pid)) @@ -172,8 +172,8 @@ func (o *commonOp) init( o.ctx, reportForTrace = reqtrace.StartSpan(ctx, o.op.ShortDesc()) // When the op is finished, report to both reqtrace and the connection. - prevFinish := o.finish - o.finish = func(err error) { + prevFinish := o.finished + o.finished = func(err error) { reportForTrace(err) prevFinish(err) } @@ -210,7 +210,7 @@ func (o *commonOp) respondErr(err error) { o.bazilReq.RespondError(err) // Report back to the connection that we are finished. - o.finish(err) + o.finished(err) } // Respond with the supplied response struct, which must be accepted by a @@ -234,5 +234,5 @@ func (o *commonOp) respond(resp interface{}) { respond.Call([]reflect.Value{reflect.ValueOf(resp)}) // Report back to the connection that we are finished. - o.finish(nil) + o.finished(nil) }