sunrpc: turn bitfield flags in svc_version into bools
It's just simpler to read this way, IMO. Also, no need to explicitly set vs_hidden to false in the nfsacl ones. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
Родитель
4ab495bfe5
Коммит
05a45a2db4
|
@ -1083,7 +1083,7 @@ struct svc_version nfs4_callback_version1 = {
|
||||||
.vs_proc = nfs4_callback_procedures1,
|
.vs_proc = nfs4_callback_procedures1,
|
||||||
.vs_xdrsize = NFS4_CALLBACK_XDRSIZE,
|
.vs_xdrsize = NFS4_CALLBACK_XDRSIZE,
|
||||||
.vs_dispatch = NULL,
|
.vs_dispatch = NULL,
|
||||||
.vs_hidden = 1,
|
.vs_hidden = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct svc_version nfs4_callback_version4 = {
|
struct svc_version nfs4_callback_version4 = {
|
||||||
|
@ -1092,5 +1092,5 @@ struct svc_version nfs4_callback_version4 = {
|
||||||
.vs_proc = nfs4_callback_procedures1,
|
.vs_proc = nfs4_callback_procedures1,
|
||||||
.vs_xdrsize = NFS4_CALLBACK_XDRSIZE,
|
.vs_xdrsize = NFS4_CALLBACK_XDRSIZE,
|
||||||
.vs_dispatch = NULL,
|
.vs_dispatch = NULL,
|
||||||
.vs_hidden = 1,
|
.vs_hidden = true,
|
||||||
};
|
};
|
||||||
|
|
|
@ -376,5 +376,4 @@ struct svc_version nfsd_acl_version2 = {
|
||||||
.vs_proc = nfsd_acl_procedures2,
|
.vs_proc = nfsd_acl_procedures2,
|
||||||
.vs_dispatch = nfsd_dispatch,
|
.vs_dispatch = nfsd_dispatch,
|
||||||
.vs_xdrsize = NFS3_SVC_XDRSIZE,
|
.vs_xdrsize = NFS3_SVC_XDRSIZE,
|
||||||
.vs_hidden = 0,
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -266,6 +266,5 @@ struct svc_version nfsd_acl_version3 = {
|
||||||
.vs_proc = nfsd_acl_procedures3,
|
.vs_proc = nfsd_acl_procedures3,
|
||||||
.vs_dispatch = nfsd_dispatch,
|
.vs_dispatch = nfsd_dispatch,
|
||||||
.vs_xdrsize = NFS3_SVC_XDRSIZE,
|
.vs_xdrsize = NFS3_SVC_XDRSIZE,
|
||||||
.vs_hidden = 0,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2542,7 +2542,7 @@ struct svc_version nfsd_version4 = {
|
||||||
.vs_proc = nfsd_procedures4,
|
.vs_proc = nfsd_procedures4,
|
||||||
.vs_dispatch = nfsd_dispatch,
|
.vs_dispatch = nfsd_dispatch,
|
||||||
.vs_xdrsize = NFS4_SVC_XDRSIZE,
|
.vs_xdrsize = NFS4_SVC_XDRSIZE,
|
||||||
.vs_rpcb_optnl = 1,
|
.vs_rpcb_optnl = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -400,10 +400,11 @@ struct svc_version {
|
||||||
struct svc_procedure * vs_proc; /* per-procedure info */
|
struct svc_procedure * vs_proc; /* per-procedure info */
|
||||||
u32 vs_xdrsize; /* xdrsize needed for this version */
|
u32 vs_xdrsize; /* xdrsize needed for this version */
|
||||||
|
|
||||||
unsigned int vs_hidden : 1, /* Don't register with portmapper.
|
/* Don't register with rpcbind */
|
||||||
* Only used for nfsacl so far. */
|
bool vs_hidden;
|
||||||
vs_rpcb_optnl:1;/* Don't care the result of register.
|
|
||||||
* Only used for nfsv4. */
|
/* Don't care if the rpcbind registration fails */
|
||||||
|
bool vs_rpcb_optnl;
|
||||||
|
|
||||||
/* Override dispatch function (e.g. when caching replies).
|
/* Override dispatch function (e.g. when caching replies).
|
||||||
* A return value of 0 means drop the request.
|
* A return value of 0 means drop the request.
|
||||||
|
|
|
@ -385,7 +385,7 @@ static int svc_uses_rpcbind(struct svc_serv *serv)
|
||||||
for (i = 0; i < progp->pg_nvers; i++) {
|
for (i = 0; i < progp->pg_nvers; i++) {
|
||||||
if (progp->pg_vers[i] == NULL)
|
if (progp->pg_vers[i] == NULL)
|
||||||
continue;
|
continue;
|
||||||
if (progp->pg_vers[i]->vs_hidden == 0)
|
if (!progp->pg_vers[i]->vs_hidden)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче