Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jeff Layton and committed by
J. Bruce Fields
05a45a2d 4ab495bf

+9 -10
+2 -2
fs/nfs/callback_xdr.c
··· 1083 1083 .vs_proc = nfs4_callback_procedures1, 1084 1084 .vs_xdrsize = NFS4_CALLBACK_XDRSIZE, 1085 1085 .vs_dispatch = NULL, 1086 - .vs_hidden = 1, 1086 + .vs_hidden = true, 1087 1087 }; 1088 1088 1089 1089 struct svc_version nfs4_callback_version4 = { ··· 1092 1092 .vs_proc = nfs4_callback_procedures1, 1093 1093 .vs_xdrsize = NFS4_CALLBACK_XDRSIZE, 1094 1094 .vs_dispatch = NULL, 1095 - .vs_hidden = 1, 1095 + .vs_hidden = true, 1096 1096 };
-1
fs/nfsd/nfs2acl.c
··· 376 376 .vs_proc = nfsd_acl_procedures2, 377 377 .vs_dispatch = nfsd_dispatch, 378 378 .vs_xdrsize = NFS3_SVC_XDRSIZE, 379 - .vs_hidden = 0, 380 379 };
-1
fs/nfsd/nfs3acl.c
··· 266 266 .vs_proc = nfsd_acl_procedures3, 267 267 .vs_dispatch = nfsd_dispatch, 268 268 .vs_xdrsize = NFS3_SVC_XDRSIZE, 269 - .vs_hidden = 0, 270 269 }; 271 270
+1 -1
fs/nfsd/nfs4proc.c
··· 2542 2542 .vs_proc = nfsd_procedures4, 2543 2543 .vs_dispatch = nfsd_dispatch, 2544 2544 .vs_xdrsize = NFS4_SVC_XDRSIZE, 2545 - .vs_rpcb_optnl = 1, 2545 + .vs_rpcb_optnl = true, 2546 2546 }; 2547 2547 2548 2548 /*
+5 -4
include/linux/sunrpc/svc.h
··· 400 400 struct svc_procedure * vs_proc; /* per-procedure info */ 401 401 u32 vs_xdrsize; /* xdrsize needed for this version */ 402 402 403 - unsigned int vs_hidden : 1, /* Don't register with portmapper. 404 - * Only used for nfsacl so far. */ 405 - vs_rpcb_optnl:1;/* Don't care the result of register. 406 - * Only used for nfsv4. */ 403 + /* Don't register with rpcbind */ 404 + bool vs_hidden; 405 + 406 + /* Don't care if the rpcbind registration fails */ 407 + bool vs_rpcb_optnl; 407 408 408 409 /* Override dispatch function (e.g. when caching replies). 409 410 * A return value of 0 means drop the request.
+1 -1
net/sunrpc/svc.c
··· 385 385 for (i = 0; i < progp->pg_nvers; i++) { 386 386 if (progp->pg_vers[i] == NULL) 387 387 continue; 388 - if (progp->pg_vers[i]->vs_hidden == 0) 388 + if (!progp->pg_vers[i]->vs_hidden) 389 389 return 1; 390 390 } 391 391 }