mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
SUNRPC: Add enum svc_auth_status
In addition to the benefits of using an enum rather than a set of macros, we now have a named type that can improve static type checking of function return values. As part of this change, I removed a stale comment from svcauth.h; the return values from current implementations of the auth_ops::release method are all zero/negative errno, not the SVC_OK enum values as the old comment suggested. Suggested-by: NeilBrown <neilb@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
@@ -1706,7 +1706,7 @@ TRACE_DEFINE_ENUM(SVC_DENIED);
|
||||
TRACE_DEFINE_ENUM(SVC_PENDING);
|
||||
TRACE_DEFINE_ENUM(SVC_COMPLETE);
|
||||
|
||||
#define svc_show_status(status) \
|
||||
#define show_svc_auth_status(status) \
|
||||
__print_symbolic(status, \
|
||||
{ SVC_GARBAGE, "SVC_GARBAGE" }, \
|
||||
{ SVC_SYSERR, "SVC_SYSERR" }, \
|
||||
@@ -1743,7 +1743,10 @@ TRACE_DEFINE_ENUM(SVC_COMPLETE);
|
||||
__entry->xid, __get_sockaddr(server), __get_sockaddr(client)
|
||||
|
||||
TRACE_EVENT_CONDITION(svc_authenticate,
|
||||
TP_PROTO(const struct svc_rqst *rqst, int auth_res),
|
||||
TP_PROTO(
|
||||
const struct svc_rqst *rqst,
|
||||
enum svc_auth_status auth_res
|
||||
),
|
||||
|
||||
TP_ARGS(rqst, auth_res),
|
||||
|
||||
@@ -1766,7 +1769,7 @@ TRACE_EVENT_CONDITION(svc_authenticate,
|
||||
TP_printk(SVC_RQST_ENDPOINT_FORMAT
|
||||
" auth_res=%s auth_stat=%s",
|
||||
SVC_RQST_ENDPOINT_VARARGS,
|
||||
svc_show_status(__entry->svc_status),
|
||||
show_svc_auth_status(__entry->svc_status),
|
||||
rpc_show_auth_stat(__entry->auth_stat))
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user