@@ -24,65 +24,86 @@ static int afs_deliver_cb_callback(struct afs_call *);
24
24
static int afs_deliver_cb_probe_uuid (struct afs_call * );
25
25
static int afs_deliver_cb_tell_me_about_yourself (struct afs_call * );
26
26
static void afs_cm_destructor (struct afs_call * );
27
+ static void SRXAFSCB_CallBack (struct work_struct * );
28
+ static void SRXAFSCB_InitCallBackState (struct work_struct * );
29
+ static void SRXAFSCB_Probe (struct work_struct * );
30
+ static void SRXAFSCB_ProbeUuid (struct work_struct * );
31
+ static void SRXAFSCB_TellMeAboutYourself (struct work_struct * );
32
+
33
+ #define CM_NAME (name ) \
34
+ const char afs_SRXCB##name##_name[] __tracepoint_string = \
35
+ "CB." #name
27
36
28
37
/*
29
38
* CB.CallBack operation type
30
39
*/
40
+ static CM_NAME (CallBack );
31
41
static const struct afs_call_type afs_SRXCBCallBack = {
32
- .name = "CB.CallBack" ,
42
+ .name = afs_SRXCBCallBack_name ,
33
43
.deliver = afs_deliver_cb_callback ,
34
44
.abort_to_error = afs_abort_to_error ,
35
45
.destructor = afs_cm_destructor ,
46
+ .work = SRXAFSCB_CallBack ,
36
47
};
37
48
38
49
/*
39
50
* CB.InitCallBackState operation type
40
51
*/
52
+ static CM_NAME (InitCallBackState );
41
53
static const struct afs_call_type afs_SRXCBInitCallBackState = {
42
- .name = "CB.InitCallBackState" ,
54
+ .name = afs_SRXCBInitCallBackState_name ,
43
55
.deliver = afs_deliver_cb_init_call_back_state ,
44
56
.abort_to_error = afs_abort_to_error ,
45
57
.destructor = afs_cm_destructor ,
58
+ .work = SRXAFSCB_InitCallBackState ,
46
59
};
47
60
48
61
/*
49
62
* CB.InitCallBackState3 operation type
50
63
*/
64
+ static CM_NAME (InitCallBackState3 );
51
65
static const struct afs_call_type afs_SRXCBInitCallBackState3 = {
52
- .name = "CB.InitCallBackState3" ,
66
+ .name = afs_SRXCBInitCallBackState3_name ,
53
67
.deliver = afs_deliver_cb_init_call_back_state3 ,
54
68
.abort_to_error = afs_abort_to_error ,
55
69
.destructor = afs_cm_destructor ,
70
+ .work = SRXAFSCB_InitCallBackState ,
56
71
};
57
72
58
73
/*
59
74
* CB.Probe operation type
60
75
*/
76
+ static CM_NAME (Probe );
61
77
static const struct afs_call_type afs_SRXCBProbe = {
62
- .name = "CB.Probe" ,
78
+ .name = afs_SRXCBProbe_name ,
63
79
.deliver = afs_deliver_cb_probe ,
64
80
.abort_to_error = afs_abort_to_error ,
65
81
.destructor = afs_cm_destructor ,
82
+ .work = SRXAFSCB_Probe ,
66
83
};
67
84
68
85
/*
69
86
* CB.ProbeUuid operation type
70
87
*/
88
+ static CM_NAME (ProbeUuid );
71
89
static const struct afs_call_type afs_SRXCBProbeUuid = {
72
- .name = "CB.ProbeUuid" ,
90
+ .name = afs_SRXCBProbeUuid_name ,
73
91
.deliver = afs_deliver_cb_probe_uuid ,
74
92
.abort_to_error = afs_abort_to_error ,
75
93
.destructor = afs_cm_destructor ,
94
+ .work = SRXAFSCB_ProbeUuid ,
76
95
};
77
96
78
97
/*
79
98
* CB.TellMeAboutYourself operation type
80
99
*/
100
+ static CM_NAME (TellMeAboutYourself );
81
101
static const struct afs_call_type afs_SRXCBTellMeAboutYourself = {
82
- .name = "CB.TellMeAboutYourself" ,
102
+ .name = afs_SRXCBTellMeAboutYourself_name ,
83
103
.deliver = afs_deliver_cb_tell_me_about_yourself ,
84
104
.abort_to_error = afs_abort_to_error ,
85
105
.destructor = afs_cm_destructor ,
106
+ .work = SRXAFSCB_TellMeAboutYourself ,
86
107
};
87
108
88
109
/*
@@ -153,6 +174,7 @@ static void SRXAFSCB_CallBack(struct work_struct *work)
153
174
afs_send_empty_reply (call );
154
175
155
176
afs_break_callbacks (call -> server , call -> count , call -> request );
177
+ afs_put_call (call );
156
178
_leave ("" );
157
179
}
158
180
@@ -274,9 +296,7 @@ static int afs_deliver_cb_callback(struct afs_call *call)
274
296
return - ENOTCONN ;
275
297
call -> server = server ;
276
298
277
- INIT_WORK (& call -> work , SRXAFSCB_CallBack );
278
- queue_work (afs_wq , & call -> work );
279
- return 0 ;
299
+ return afs_queue_call_work (call );
280
300
}
281
301
282
302
/*
@@ -290,6 +310,7 @@ static void SRXAFSCB_InitCallBackState(struct work_struct *work)
290
310
291
311
afs_init_callback_state (call -> server );
292
312
afs_send_empty_reply (call );
313
+ afs_put_call (call );
293
314
_leave ("" );
294
315
}
295
316
@@ -320,9 +341,7 @@ static int afs_deliver_cb_init_call_back_state(struct afs_call *call)
320
341
return - ENOTCONN ;
321
342
call -> server = server ;
322
343
323
- INIT_WORK (& call -> work , SRXAFSCB_InitCallBackState );
324
- queue_work (afs_wq , & call -> work );
325
- return 0 ;
344
+ return afs_queue_call_work (call );
326
345
}
327
346
328
347
/*
@@ -394,9 +413,7 @@ static int afs_deliver_cb_init_call_back_state3(struct afs_call *call)
394
413
return - ENOTCONN ;
395
414
call -> server = server ;
396
415
397
- INIT_WORK (& call -> work , SRXAFSCB_InitCallBackState );
398
- queue_work (afs_wq , & call -> work );
399
- return 0 ;
416
+ return afs_queue_call_work (call );
400
417
}
401
418
402
419
/*
@@ -408,6 +425,7 @@ static void SRXAFSCB_Probe(struct work_struct *work)
408
425
409
426
_enter ("" );
410
427
afs_send_empty_reply (call );
428
+ afs_put_call (call );
411
429
_leave ("" );
412
430
}
413
431
@@ -427,9 +445,7 @@ static int afs_deliver_cb_probe(struct afs_call *call)
427
445
/* no unmarshalling required */
428
446
call -> state = AFS_CALL_REPLYING ;
429
447
430
- INIT_WORK (& call -> work , SRXAFSCB_Probe );
431
- queue_work (afs_wq , & call -> work );
432
- return 0 ;
448
+ return afs_queue_call_work (call );
433
449
}
434
450
435
451
/*
@@ -452,6 +468,7 @@ static void SRXAFSCB_ProbeUuid(struct work_struct *work)
452
468
reply .match = htonl (1 );
453
469
454
470
afs_send_simple_reply (call , & reply , sizeof (reply ));
471
+ afs_put_call (call );
455
472
_leave ("" );
456
473
}
457
474
@@ -510,9 +527,7 @@ static int afs_deliver_cb_probe_uuid(struct afs_call *call)
510
527
511
528
call -> state = AFS_CALL_REPLYING ;
512
529
513
- INIT_WORK (& call -> work , SRXAFSCB_ProbeUuid );
514
- queue_work (afs_wq , & call -> work );
515
- return 0 ;
530
+ return afs_queue_call_work (call );
516
531
}
517
532
518
533
/*
@@ -574,7 +589,7 @@ static void SRXAFSCB_TellMeAboutYourself(struct work_struct *work)
574
589
reply .cap .capcount = htonl (1 );
575
590
reply .cap .caps [0 ] = htonl (AFS_CAP_ERROR_TRANSLATION );
576
591
afs_send_simple_reply (call , & reply , sizeof (reply ));
577
-
592
+ afs_put_call ( call );
578
593
_leave ("" );
579
594
}
580
595
@@ -594,7 +609,5 @@ static int afs_deliver_cb_tell_me_about_yourself(struct afs_call *call)
594
609
/* no unmarshalling required */
595
610
call -> state = AFS_CALL_REPLYING ;
596
611
597
- INIT_WORK (& call -> work , SRXAFSCB_TellMeAboutYourself );
598
- queue_work (afs_wq , & call -> work );
599
- return 0 ;
612
+ return afs_queue_call_work (call );
600
613
}
0 commit comments