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

SUNRPC: Replace the "__be32 *p" parameter to .pc_encode

The passed-in value of the "__be32 *p" parameter is now unused in
every server-side XDR encoder, and can be removed.

Note also that there is a line in each encoder that sets up a local
pointer to a struct xdr_stream. Passing that pointer from the
dispatcher instead saves one line per encoder function.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>

authored by

Chuck Lever and committed by
J. Bruce Fields
fda49441 3b0ebb25

+85 -112
+1 -2
fs/lockd/svc.c
··· 780 780 static int nlmsvc_dispatch(struct svc_rqst *rqstp, __be32 *statp) 781 781 { 782 782 const struct svc_procedure *procp = rqstp->rq_procinfo; 783 - struct kvec *resv = rqstp->rq_res.head; 784 783 785 784 svcxdr_init_decode(rqstp); 786 785 if (!procp->pc_decode(rqstp, &rqstp->rq_arg_stream)) ··· 792 793 return 1; 793 794 794 795 svcxdr_init_encode(rqstp); 795 - if (!procp->pc_encode(rqstp, resv->iov_base + resv->iov_len)) 796 + if (!procp->pc_encode(rqstp, &rqstp->rq_res_stream)) 796 797 goto out_encode_err; 797 798 798 799 return 1;
+4 -7
fs/lockd/xdr.c
··· 314 314 */ 315 315 316 316 int 317 - nlmsvc_encode_void(struct svc_rqst *rqstp, __be32 *p) 317 + nlmsvc_encode_void(struct svc_rqst *rqstp, struct xdr_stream *xdr) 318 318 { 319 319 return 1; 320 320 } 321 321 322 322 int 323 - nlmsvc_encode_testres(struct svc_rqst *rqstp, __be32 *p) 323 + nlmsvc_encode_testres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 324 324 { 325 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 326 325 struct nlm_res *resp = rqstp->rq_resp; 327 326 328 327 return svcxdr_encode_cookie(xdr, &resp->cookie) && ··· 329 330 } 330 331 331 332 int 332 - nlmsvc_encode_res(struct svc_rqst *rqstp, __be32 *p) 333 + nlmsvc_encode_res(struct svc_rqst *rqstp, struct xdr_stream *xdr) 333 334 { 334 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 335 335 struct nlm_res *resp = rqstp->rq_resp; 336 336 337 337 return svcxdr_encode_cookie(xdr, &resp->cookie) && ··· 338 340 } 339 341 340 342 int 341 - nlmsvc_encode_shareres(struct svc_rqst *rqstp, __be32 *p) 343 + nlmsvc_encode_shareres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 342 344 { 343 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 344 345 struct nlm_res *resp = rqstp->rq_resp; 345 346 346 347 if (!svcxdr_encode_cookie(xdr, &resp->cookie))
+4 -7
fs/lockd/xdr4.c
··· 313 313 */ 314 314 315 315 int 316 - nlm4svc_encode_void(struct svc_rqst *rqstp, __be32 *p) 316 + nlm4svc_encode_void(struct svc_rqst *rqstp, struct xdr_stream *xdr) 317 317 { 318 318 return 1; 319 319 } 320 320 321 321 int 322 - nlm4svc_encode_testres(struct svc_rqst *rqstp, __be32 *p) 322 + nlm4svc_encode_testres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 323 323 { 324 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 325 324 struct nlm_res *resp = rqstp->rq_resp; 326 325 327 326 return svcxdr_encode_cookie(xdr, &resp->cookie) && ··· 328 329 } 329 330 330 331 int 331 - nlm4svc_encode_res(struct svc_rqst *rqstp, __be32 *p) 332 + nlm4svc_encode_res(struct svc_rqst *rqstp, struct xdr_stream *xdr) 332 333 { 333 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 334 334 struct nlm_res *resp = rqstp->rq_resp; 335 335 336 336 return svcxdr_encode_cookie(xdr, &resp->cookie) && ··· 337 339 } 338 340 339 341 int 340 - nlm4svc_encode_shareres(struct svc_rqst *rqstp, __be32 *p) 342 + nlm4svc_encode_shareres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 341 343 { 342 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 343 344 struct nlm_res *resp = rqstp->rq_resp; 344 345 345 346 if (!svcxdr_encode_cookie(xdr, &resp->cookie))
+2 -2
fs/nfs/callback_xdr.c
··· 67 67 * svc_process_common() looks for an XDR encoder to know when 68 68 * not to drop a Reply. 69 69 */ 70 - static int nfs4_encode_void(struct svc_rqst *rqstp, __be32 *p) 70 + static int nfs4_encode_void(struct svc_rqst *rqstp, struct xdr_stream *xdr) 71 71 { 72 - return xdr_ressize_check(rqstp, p); 72 + return 1; 73 73 } 74 74 75 75 static __be32 decode_string(struct xdr_stream *xdr, unsigned int *len,
+4 -4
fs/nfsd/nfs2acl.c
··· 240 240 */ 241 241 242 242 /* GETACL */ 243 - static int nfsaclsvc_encode_getaclres(struct svc_rqst *rqstp, __be32 *p) 243 + static int 244 + nfsaclsvc_encode_getaclres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 244 245 { 245 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 246 246 struct nfsd3_getaclres *resp = rqstp->rq_resp; 247 247 struct dentry *dentry = resp->fh.fh_dentry; 248 248 struct inode *inode; ··· 280 280 } 281 281 282 282 /* ACCESS */ 283 - static int nfsaclsvc_encode_accessres(struct svc_rqst *rqstp, __be32 *p) 283 + static int 284 + nfsaclsvc_encode_accessres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 284 285 { 285 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 286 286 struct nfsd3_accessres *resp = rqstp->rq_resp; 287 287 288 288 if (!svcxdr_encode_stat(xdr, resp->status))
+4 -4
fs/nfsd/nfs3acl.c
··· 166 166 */ 167 167 168 168 /* GETACL */ 169 - static int nfs3svc_encode_getaclres(struct svc_rqst *rqstp, __be32 *p) 169 + static int 170 + nfs3svc_encode_getaclres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 170 171 { 171 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 172 172 struct nfsd3_getaclres *resp = rqstp->rq_resp; 173 173 struct dentry *dentry = resp->fh.fh_dentry; 174 174 struct kvec *head = rqstp->rq_res.head; ··· 218 218 } 219 219 220 220 /* SETACL */ 221 - static int nfs3svc_encode_setaclres(struct svc_rqst *rqstp, __be32 *p) 221 + static int 222 + nfs3svc_encode_setaclres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 222 223 { 223 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 224 224 struct nfsd3_attrstat *resp = rqstp->rq_resp; 225 225 226 226 return svcxdr_encode_nfsstat3(xdr, resp->status) &&
+16 -30
fs/nfsd/nfs3xdr.c
··· 813 813 814 814 /* GETATTR */ 815 815 int 816 - nfs3svc_encode_getattrres(struct svc_rqst *rqstp, __be32 *p) 816 + nfs3svc_encode_getattrres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 817 817 { 818 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 819 818 struct nfsd3_attrstat *resp = rqstp->rq_resp; 820 819 821 820 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) ··· 832 833 833 834 /* SETATTR, REMOVE, RMDIR */ 834 835 int 835 - nfs3svc_encode_wccstat(struct svc_rqst *rqstp, __be32 *p) 836 + nfs3svc_encode_wccstat(struct svc_rqst *rqstp, struct xdr_stream *xdr) 836 837 { 837 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 838 838 struct nfsd3_attrstat *resp = rqstp->rq_resp; 839 839 840 840 return svcxdr_encode_nfsstat3(xdr, resp->status) && ··· 841 843 } 842 844 843 845 /* LOOKUP */ 844 - int nfs3svc_encode_lookupres(struct svc_rqst *rqstp, __be32 *p) 846 + int 847 + nfs3svc_encode_lookupres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 845 848 { 846 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 847 849 struct nfsd3_diropres *resp = rqstp->rq_resp; 848 850 849 851 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) ··· 867 869 868 870 /* ACCESS */ 869 871 int 870 - nfs3svc_encode_accessres(struct svc_rqst *rqstp, __be32 *p) 872 + nfs3svc_encode_accessres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 871 873 { 872 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 873 874 struct nfsd3_accessres *resp = rqstp->rq_resp; 874 875 875 876 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) ··· 890 893 891 894 /* READLINK */ 892 895 int 893 - nfs3svc_encode_readlinkres(struct svc_rqst *rqstp, __be32 *p) 896 + nfs3svc_encode_readlinkres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 894 897 { 895 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 896 898 struct nfsd3_readlinkres *resp = rqstp->rq_resp; 897 899 struct kvec *head = rqstp->rq_res.head; 898 900 ··· 917 921 918 922 /* READ */ 919 923 int 920 - nfs3svc_encode_readres(struct svc_rqst *rqstp, __be32 *p) 924 + nfs3svc_encode_readres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 921 925 { 922 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 923 926 struct nfsd3_readres *resp = rqstp->rq_resp; 924 927 struct kvec *head = rqstp->rq_res.head; 925 928 ··· 949 954 950 955 /* WRITE */ 951 956 int 952 - nfs3svc_encode_writeres(struct svc_rqst *rqstp, __be32 *p) 957 + nfs3svc_encode_writeres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 953 958 { 954 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 955 959 struct nfsd3_writeres *resp = rqstp->rq_resp; 956 960 957 961 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) ··· 976 982 977 983 /* CREATE, MKDIR, SYMLINK, MKNOD */ 978 984 int 979 - nfs3svc_encode_createres(struct svc_rqst *rqstp, __be32 *p) 985 + nfs3svc_encode_createres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 980 986 { 981 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 982 987 struct nfsd3_diropres *resp = rqstp->rq_resp; 983 988 984 989 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) ··· 1001 1008 1002 1009 /* RENAME */ 1003 1010 int 1004 - nfs3svc_encode_renameres(struct svc_rqst *rqstp, __be32 *p) 1011 + nfs3svc_encode_renameres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 1005 1012 { 1006 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 1007 1013 struct nfsd3_renameres *resp = rqstp->rq_resp; 1008 1014 1009 1015 return svcxdr_encode_nfsstat3(xdr, resp->status) && ··· 1012 1020 1013 1021 /* LINK */ 1014 1022 int 1015 - nfs3svc_encode_linkres(struct svc_rqst *rqstp, __be32 *p) 1023 + nfs3svc_encode_linkres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 1016 1024 { 1017 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 1018 1025 struct nfsd3_linkres *resp = rqstp->rq_resp; 1019 1026 1020 1027 return svcxdr_encode_nfsstat3(xdr, resp->status) && ··· 1023 1032 1024 1033 /* READDIR */ 1025 1034 int 1026 - nfs3svc_encode_readdirres(struct svc_rqst *rqstp, __be32 *p) 1035 + nfs3svc_encode_readdirres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 1027 1036 { 1028 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 1029 1037 struct nfsd3_readdirres *resp = rqstp->rq_resp; 1030 1038 struct xdr_buf *dirlist = &resp->dirlist; 1031 1039 ··· 1276 1286 1277 1287 /* FSSTAT */ 1278 1288 int 1279 - nfs3svc_encode_fsstatres(struct svc_rqst *rqstp, __be32 *p) 1289 + nfs3svc_encode_fsstatres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 1280 1290 { 1281 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 1282 1291 struct nfsd3_fsstatres *resp = rqstp->rq_resp; 1283 1292 1284 1293 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) ··· 1322 1333 1323 1334 /* FSINFO */ 1324 1335 int 1325 - nfs3svc_encode_fsinfores(struct svc_rqst *rqstp, __be32 *p) 1336 + nfs3svc_encode_fsinfores(struct svc_rqst *rqstp, struct xdr_stream *xdr) 1326 1337 { 1327 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 1328 1338 struct nfsd3_fsinfores *resp = rqstp->rq_resp; 1329 1339 1330 1340 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) ··· 1364 1376 1365 1377 /* PATHCONF */ 1366 1378 int 1367 - nfs3svc_encode_pathconfres(struct svc_rqst *rqstp, __be32 *p) 1379 + nfs3svc_encode_pathconfres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 1368 1380 { 1369 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 1370 1381 struct nfsd3_pathconfres *resp = rqstp->rq_resp; 1371 1382 1372 1383 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) ··· 1387 1400 1388 1401 /* COMMIT */ 1389 1402 int 1390 - nfs3svc_encode_commitres(struct svc_rqst *rqstp, __be32 *p) 1403 + nfs3svc_encode_commitres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 1391 1404 { 1392 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 1393 1405 struct nfsd3_commitres *resp = rqstp->rq_resp; 1394 1406 1395 1407 if (!svcxdr_encode_nfsstat3(xdr, resp->status))
+4 -3
fs/nfsd/nfs4xdr.c
··· 5427 5427 } 5428 5428 5429 5429 int 5430 - nfs4svc_encode_compoundres(struct svc_rqst *rqstp, __be32 *p) 5430 + nfs4svc_encode_compoundres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 5431 5431 { 5432 5432 struct nfsd4_compoundres *resp = rqstp->rq_resp; 5433 - struct xdr_buf *buf = resp->xdr->buf; 5433 + struct xdr_buf *buf = xdr->buf; 5434 + __be32 *p; 5434 5435 5435 5436 WARN_ON_ONCE(buf->len != buf->head[0].iov_len + buf->page_len + 5436 5437 buf->tail[0].iov_len); ··· 5444 5443 5445 5444 *p++ = resp->cstate.status; 5446 5445 5447 - rqstp->rq_next_page = resp->xdr->page_ptr + 1; 5446 + rqstp->rq_next_page = xdr->page_ptr + 1; 5448 5447 5449 5448 *p++ = htonl(resp->taglen); 5450 5449 memcpy(p, resp->tag, resp->taglen);
+2 -1
fs/nfsd/nfsd.h
··· 80 80 struct nfsd_voidres { }; 81 81 bool nfssvc_decode_voidarg(struct svc_rqst *rqstp, 82 82 struct xdr_stream *xdr); 83 - int nfssvc_encode_voidres(struct svc_rqst *rqstp, __be32 *p); 83 + int nfssvc_encode_voidres(struct svc_rqst *rqstp, 84 + struct xdr_stream *xdr); 84 85 85 86 /* 86 87 * Function prototypes.
+3 -6
fs/nfsd/nfssvc.c
··· 1004 1004 int nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp) 1005 1005 { 1006 1006 const struct svc_procedure *proc = rqstp->rq_procinfo; 1007 - struct kvec *resv = &rqstp->rq_res.head[0]; 1008 - __be32 *p; 1009 1007 1010 1008 /* 1011 1009 * Give the xdr decoder a chance to change this if it wants ··· 1028 1030 * Need to grab the location to store the status, as 1029 1031 * NFSv4 does some encoding while processing 1030 1032 */ 1031 - p = resv->iov_base + resv->iov_len; 1032 1033 svcxdr_init_encode(rqstp); 1033 1034 1034 1035 *statp = proc->pc_func(rqstp); 1035 1036 if (*statp == rpc_drop_reply || test_bit(RQ_DROPME, &rqstp->rq_flags)) 1036 1037 goto out_update_drop; 1037 1038 1038 - if (!proc->pc_encode(rqstp, p)) 1039 + if (!proc->pc_encode(rqstp, &rqstp->rq_res_stream)) 1039 1040 goto out_encode_err; 1040 1041 1041 1042 nfsd_cache_update(rqstp, rqstp->rq_cachetype, statp + 1); ··· 1075 1078 /** 1076 1079 * nfssvc_encode_voidres - Encode void results 1077 1080 * @rqstp: Server RPC transaction context 1078 - * @p: buffer in which to encode results 1081 + * @xdr: XDR stream into which to encode results 1079 1082 * 1080 1083 * Return values: 1081 1084 * %0: Local error while encoding 1082 1085 * %1: Encoding was successful 1083 1086 */ 1084 - int nfssvc_encode_voidres(struct svc_rqst *rqstp, __be32 *p) 1087 + int nfssvc_encode_voidres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 1085 1088 { 1086 1089 return 1; 1087 1090 }
+8 -14
fs/nfsd/nfsxdr.c
··· 415 415 */ 416 416 417 417 int 418 - nfssvc_encode_statres(struct svc_rqst *rqstp, __be32 *p) 418 + nfssvc_encode_statres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 419 419 { 420 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 421 420 struct nfsd_stat *resp = rqstp->rq_resp; 422 421 423 422 return svcxdr_encode_stat(xdr, resp->status); 424 423 } 425 424 426 425 int 427 - nfssvc_encode_attrstatres(struct svc_rqst *rqstp, __be32 *p) 426 + nfssvc_encode_attrstatres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 428 427 { 429 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 430 428 struct nfsd_attrstat *resp = rqstp->rq_resp; 431 429 432 430 if (!svcxdr_encode_stat(xdr, resp->status)) ··· 440 442 } 441 443 442 444 int 443 - nfssvc_encode_diropres(struct svc_rqst *rqstp, __be32 *p) 445 + nfssvc_encode_diropres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 444 446 { 445 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 446 447 struct nfsd_diropres *resp = rqstp->rq_resp; 447 448 448 449 if (!svcxdr_encode_stat(xdr, resp->status)) ··· 459 462 } 460 463 461 464 int 462 - nfssvc_encode_readlinkres(struct svc_rqst *rqstp, __be32 *p) 465 + nfssvc_encode_readlinkres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 463 466 { 464 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 465 467 struct nfsd_readlinkres *resp = rqstp->rq_resp; 466 468 struct kvec *head = rqstp->rq_res.head; 467 469 ··· 480 484 } 481 485 482 486 int 483 - nfssvc_encode_readres(struct svc_rqst *rqstp, __be32 *p) 487 + nfssvc_encode_readres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 484 488 { 485 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 486 489 struct nfsd_readres *resp = rqstp->rq_resp; 487 490 struct kvec *head = rqstp->rq_res.head; 488 491 ··· 504 509 } 505 510 506 511 int 507 - nfssvc_encode_readdirres(struct svc_rqst *rqstp, __be32 *p) 512 + nfssvc_encode_readdirres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 508 513 { 509 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 510 514 struct nfsd_readdirres *resp = rqstp->rq_resp; 511 515 struct xdr_buf *dirlist = &resp->dirlist; 512 516 ··· 526 532 } 527 533 528 534 int 529 - nfssvc_encode_statfsres(struct svc_rqst *rqstp, __be32 *p) 535 + nfssvc_encode_statfsres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 530 536 { 531 - struct xdr_stream *xdr = &rqstp->rq_res_stream; 532 537 struct nfsd_statfsres *resp = rqstp->rq_resp; 533 538 struct kstatfs *stat = &resp->stats; 539 + __be32 *p; 534 540 535 541 if (!svcxdr_encode_stat(xdr, resp->status)) 536 542 return 0;
+7 -7
fs/nfsd/xdr.h
··· 152 152 bool nfssvc_decode_symlinkargs(struct svc_rqst *rqstp, struct xdr_stream *xdr); 153 153 bool nfssvc_decode_readdirargs(struct svc_rqst *rqstp, struct xdr_stream *xdr); 154 154 155 - int nfssvc_encode_statres(struct svc_rqst *, __be32 *); 156 - int nfssvc_encode_attrstatres(struct svc_rqst *, __be32 *); 157 - int nfssvc_encode_diropres(struct svc_rqst *, __be32 *); 158 - int nfssvc_encode_readlinkres(struct svc_rqst *, __be32 *); 159 - int nfssvc_encode_readres(struct svc_rqst *, __be32 *); 160 - int nfssvc_encode_statfsres(struct svc_rqst *, __be32 *); 161 - int nfssvc_encode_readdirres(struct svc_rqst *, __be32 *); 155 + int nfssvc_encode_statres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 156 + int nfssvc_encode_attrstatres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 157 + int nfssvc_encode_diropres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 158 + int nfssvc_encode_readlinkres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 159 + int nfssvc_encode_readres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 160 + int nfssvc_encode_statfsres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 161 + int nfssvc_encode_readdirres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 162 162 163 163 void nfssvc_encode_nfscookie(struct nfsd_readdirres *resp, u32 offset); 164 164 int nfssvc_encode_entry(void *data, const char *name, int namlen,
+15 -15
fs/nfsd/xdr3.h
··· 281 281 bool nfs3svc_decode_readdirplusargs(struct svc_rqst *rqstp, struct xdr_stream *xdr); 282 282 bool nfs3svc_decode_commitargs(struct svc_rqst *rqstp, struct xdr_stream *xdr); 283 283 284 - int nfs3svc_encode_getattrres(struct svc_rqst *, __be32 *); 285 - int nfs3svc_encode_wccstat(struct svc_rqst *, __be32 *); 286 - int nfs3svc_encode_lookupres(struct svc_rqst *, __be32 *); 287 - int nfs3svc_encode_accessres(struct svc_rqst *, __be32 *); 288 - int nfs3svc_encode_readlinkres(struct svc_rqst *, __be32 *); 289 - int nfs3svc_encode_readres(struct svc_rqst *, __be32 *); 290 - int nfs3svc_encode_writeres(struct svc_rqst *, __be32 *); 291 - int nfs3svc_encode_createres(struct svc_rqst *, __be32 *); 292 - int nfs3svc_encode_renameres(struct svc_rqst *, __be32 *); 293 - int nfs3svc_encode_linkres(struct svc_rqst *, __be32 *); 294 - int nfs3svc_encode_readdirres(struct svc_rqst *, __be32 *); 295 - int nfs3svc_encode_fsstatres(struct svc_rqst *, __be32 *); 296 - int nfs3svc_encode_fsinfores(struct svc_rqst *, __be32 *); 297 - int nfs3svc_encode_pathconfres(struct svc_rqst *, __be32 *); 298 - int nfs3svc_encode_commitres(struct svc_rqst *, __be32 *); 284 + int nfs3svc_encode_getattrres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 285 + int nfs3svc_encode_wccstat(struct svc_rqst *rqstp, struct xdr_stream *xdr); 286 + int nfs3svc_encode_lookupres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 287 + int nfs3svc_encode_accessres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 288 + int nfs3svc_encode_readlinkres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 289 + int nfs3svc_encode_readres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 290 + int nfs3svc_encode_writeres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 291 + int nfs3svc_encode_createres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 292 + int nfs3svc_encode_renameres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 293 + int nfs3svc_encode_linkres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 294 + int nfs3svc_encode_readdirres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 295 + int nfs3svc_encode_fsstatres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 296 + int nfs3svc_encode_fsinfores(struct svc_rqst *rqstp, struct xdr_stream *xdr); 297 + int nfs3svc_encode_pathconfres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 298 + int nfs3svc_encode_commitres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 299 299 300 300 void nfs3svc_release_fhandle(struct svc_rqst *); 301 301 void nfs3svc_release_fhandle2(struct svc_rqst *);
+1 -1
fs/nfsd/xdr4.h
··· 758 758 759 759 bool nfsd4_mach_creds_match(struct nfs4_client *cl, struct svc_rqst *rqstp); 760 760 bool nfs4svc_decode_compoundargs(struct svc_rqst *rqstp, struct xdr_stream *xdr); 761 - int nfs4svc_encode_compoundres(struct svc_rqst *, __be32 *); 761 + int nfs4svc_encode_compoundres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 762 762 __be32 nfsd4_check_resp_size(struct nfsd4_compoundres *, u32); 763 763 void nfsd4_encode_operation(struct nfsd4_compoundres *, struct nfsd4_op *); 764 764 void nfsd4_encode_replay(struct xdr_stream *xdr, struct nfsd4_op *op);
+4 -4
include/linux/lockd/xdr.h
··· 106 106 bool nlmsvc_decode_shareargs(struct svc_rqst *rqstp, struct xdr_stream *xdr); 107 107 bool nlmsvc_decode_notify(struct svc_rqst *rqstp, struct xdr_stream *xdr); 108 108 109 - int nlmsvc_encode_testres(struct svc_rqst *, __be32 *); 110 - int nlmsvc_encode_res(struct svc_rqst *, __be32 *); 111 - int nlmsvc_encode_void(struct svc_rqst *, __be32 *); 112 - int nlmsvc_encode_shareres(struct svc_rqst *, __be32 *); 109 + int nlmsvc_encode_testres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 110 + int nlmsvc_encode_res(struct svc_rqst *rqstp, struct xdr_stream *xdr); 111 + int nlmsvc_encode_void(struct svc_rqst *rqstp, struct xdr_stream *xdr); 112 + int nlmsvc_encode_shareres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 113 113 114 114 #endif /* LOCKD_XDR_H */
+4 -4
include/linux/lockd/xdr4.h
··· 32 32 bool nlm4svc_decode_shareargs(struct svc_rqst *rqstp, struct xdr_stream *xdr); 33 33 bool nlm4svc_decode_notify(struct svc_rqst *rqstp, struct xdr_stream *xdr); 34 34 35 - int nlm4svc_encode_testres(struct svc_rqst *, __be32 *); 36 - int nlm4svc_encode_res(struct svc_rqst *, __be32 *); 37 - int nlm4svc_encode_void(struct svc_rqst *, __be32 *); 38 - int nlm4svc_encode_shareres(struct svc_rqst *, __be32 *); 35 + int nlm4svc_encode_testres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 36 + int nlm4svc_encode_res(struct svc_rqst *rqstp, struct xdr_stream *xdr); 37 + int nlm4svc_encode_void(struct svc_rqst *rqstp, struct xdr_stream *xdr); 38 + int nlm4svc_encode_shareres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 39 39 40 40 extern const struct rpc_version nlm_version4; 41 41
+2 -1
include/linux/sunrpc/svc.h
··· 457 457 bool (*pc_decode)(struct svc_rqst *rqstp, 458 458 struct xdr_stream *xdr); 459 459 /* XDR encode result: */ 460 - int (*pc_encode)(struct svc_rqst *, __be32 *data); 460 + int (*pc_encode)(struct svc_rqst *rqstp, 461 + struct xdr_stream *xdr); 461 462 /* XDR free result: */ 462 463 void (*pc_release)(struct svc_rqst *); 463 464 unsigned int pc_argsize; /* argument struct size */