Lines Matching refs:argp

121 svcxdr_tmpalloc(struct nfsd4_compoundargs *argp, u32 len)  in svcxdr_tmpalloc()  argument
128 tb->next = argp->to_free; in svcxdr_tmpalloc()
129 argp->to_free = tb; in svcxdr_tmpalloc()
141 svcxdr_dupstr(struct nfsd4_compoundargs *argp, void *buf, u32 len) in svcxdr_dupstr() argument
143 char *p = svcxdr_tmpalloc(argp, len + 1); in svcxdr_dupstr()
153 svcxdr_savemem(struct nfsd4_compoundargs *argp, __be32 *p, u32 len) in svcxdr_savemem() argument
161 if (p != argp->xdr->scratch.iov_base) in svcxdr_savemem()
164 tmp = svcxdr_tmpalloc(argp, len); in svcxdr_savemem()
180 nfsd4_decode_ignored_string(struct nfsd4_compoundargs *argp, u32 maxlen) in nfsd4_decode_ignored_string() argument
184 if (xdr_stream_decode_u32(argp->xdr, &len) < 0) in nfsd4_decode_ignored_string()
188 if (!xdr_inline_decode(argp->xdr, len)) in nfsd4_decode_ignored_string()
195 nfsd4_decode_opaque(struct nfsd4_compoundargs *argp, struct xdr_netobj *o) in nfsd4_decode_opaque() argument
200 if (xdr_stream_decode_u32(argp->xdr, &len) < 0) in nfsd4_decode_opaque()
204 p = xdr_inline_decode(argp->xdr, len); in nfsd4_decode_opaque()
207 o->data = svcxdr_savemem(argp, p, len); in nfsd4_decode_opaque()
216 nfsd4_decode_component4(struct nfsd4_compoundargs *argp, char **namp, u32 *lenp) in nfsd4_decode_component4() argument
220 if (xdr_stream_decode_u32(argp->xdr, lenp) < 0) in nfsd4_decode_component4()
222 p = xdr_inline_decode(argp->xdr, *lenp); in nfsd4_decode_component4()
228 *namp = svcxdr_savemem(argp, p, *lenp); in nfsd4_decode_component4()
236 nfsd4_decode_nfstime4(struct nfsd4_compoundargs *argp, struct timespec64 *tv) in nfsd4_decode_nfstime4() argument
240 p = xdr_inline_decode(argp->xdr, XDR_UNIT * 3); in nfsd4_decode_nfstime4()
251 nfsd4_decode_verifier4(struct nfsd4_compoundargs *argp, nfs4_verifier *verf) in nfsd4_decode_verifier4() argument
255 p = xdr_inline_decode(argp->xdr, NFS4_VERIFIER_SIZE); in nfsd4_decode_verifier4()
280 nfsd4_decode_bitmap4(struct nfsd4_compoundargs *argp, u32 *bmval, u32 bmlen) in nfsd4_decode_bitmap4() argument
284 status = xdr_stream_decode_uint32_array(argp->xdr, bmval, bmlen); in nfsd4_decode_bitmap4()
289 nfsd4_decode_nfsace4(struct nfsd4_compoundargs *argp, struct nfs4_ace *ace) in nfsd4_decode_nfsace4() argument
294 if (xdr_stream_decode_u32(argp->xdr, &ace->type) < 0) in nfsd4_decode_nfsace4()
296 if (xdr_stream_decode_u32(argp->xdr, &ace->flag) < 0) in nfsd4_decode_nfsace4()
298 if (xdr_stream_decode_u32(argp->xdr, &ace->access_mask) < 0) in nfsd4_decode_nfsace4()
301 if (xdr_stream_decode_u32(argp->xdr, &length) < 0) in nfsd4_decode_nfsace4()
303 p = xdr_inline_decode(argp->xdr, length); in nfsd4_decode_nfsace4()
310 status = nfsd_map_name_to_gid(argp->rqstp, in nfsd4_decode_nfsace4()
313 status = nfsd_map_name_to_uid(argp->rqstp, in nfsd4_decode_nfsace4()
321 nfsd4_decode_acl(struct nfsd4_compoundargs *argp, struct nfs4_acl **acl) in nfsd4_decode_acl() argument
327 if (xdr_stream_decode_u32(argp->xdr, &count) < 0) in nfsd4_decode_acl()
330 if (count > xdr_stream_remaining(argp->xdr) / 20) in nfsd4_decode_acl()
338 *acl = svcxdr_tmpalloc(argp, nfs4_acl_bytes(count)); in nfsd4_decode_acl()
344 status = nfsd4_decode_nfsace4(argp, ace); in nfsd4_decode_acl()
353 nfsd4_decode_security_label(struct nfsd4_compoundargs *argp, in nfsd4_decode_security_label() argument
359 if (xdr_stream_decode_u32(argp->xdr, &lfs) < 0) in nfsd4_decode_security_label()
361 if (xdr_stream_decode_u32(argp->xdr, &pi) < 0) in nfsd4_decode_security_label()
364 if (xdr_stream_decode_u32(argp->xdr, &length) < 0) in nfsd4_decode_security_label()
368 p = xdr_inline_decode(argp->xdr, length); in nfsd4_decode_security_label()
372 label->data = svcxdr_dupstr(argp, p, length); in nfsd4_decode_security_label()
380 nfsd4_decode_fattr4(struct nfsd4_compoundargs *argp, u32 *bmval, u32 bmlen, in nfsd4_decode_fattr4() argument
389 status = nfsd4_decode_bitmap4(argp, bmval, bmlen); in nfsd4_decode_fattr4()
396 if (nfsd_attrs_supported(argp->minorversion, bmval)) in nfsd4_decode_fattr4()
401 if (xdr_stream_decode_u32(argp->xdr, &attrlist4_count) < 0) in nfsd4_decode_fattr4()
403 starting_pos = xdr_stream_pos(argp->xdr); in nfsd4_decode_fattr4()
408 if (xdr_stream_decode_u64(argp->xdr, &size) < 0) in nfsd4_decode_fattr4()
414 status = nfsd4_decode_acl(argp, acl); in nfsd4_decode_fattr4()
422 if (xdr_stream_decode_u32(argp->xdr, &mode) < 0) in nfsd4_decode_fattr4()
431 if (xdr_stream_decode_u32(argp->xdr, &length) < 0) in nfsd4_decode_fattr4()
433 p = xdr_inline_decode(argp->xdr, length); in nfsd4_decode_fattr4()
436 status = nfsd_map_name_to_uid(argp->rqstp, (char *)p, length, in nfsd4_decode_fattr4()
445 if (xdr_stream_decode_u32(argp->xdr, &length) < 0) in nfsd4_decode_fattr4()
447 p = xdr_inline_decode(argp->xdr, length); in nfsd4_decode_fattr4()
450 status = nfsd_map_name_to_gid(argp->rqstp, (char *)p, length, in nfsd4_decode_fattr4()
459 if (xdr_stream_decode_u32(argp->xdr, &set_it) < 0) in nfsd4_decode_fattr4()
463 status = nfsd4_decode_nfstime4(argp, &iattr->ia_atime); in nfsd4_decode_fattr4()
480 status = nfsd4_decode_nfstime4(argp, &ts); in nfsd4_decode_fattr4()
487 if (xdr_stream_decode_u32(argp->xdr, &set_it) < 0) in nfsd4_decode_fattr4()
491 status = nfsd4_decode_nfstime4(argp, &iattr->ia_mtime); in nfsd4_decode_fattr4()
506 status = nfsd4_decode_security_label(argp, label); in nfsd4_decode_fattr4()
515 if (xdr_stream_decode_u32(argp->xdr, &mode) < 0) in nfsd4_decode_fattr4()
518 if (xdr_stream_decode_u32(argp->xdr, &mask) < 0) in nfsd4_decode_fattr4()
525 if (attrlist4_count != xdr_stream_pos(argp->xdr) - starting_pos) in nfsd4_decode_fattr4()
532 nfsd4_decode_stateid4(struct nfsd4_compoundargs *argp, stateid_t *sid) in nfsd4_decode_stateid4() argument
536 p = xdr_inline_decode(argp->xdr, NFS4_STATEID_SIZE); in nfsd4_decode_stateid4()
545 nfsd4_decode_clientid4(struct nfsd4_compoundargs *argp, clientid_t *clientid) in nfsd4_decode_clientid4() argument
549 p = xdr_inline_decode(argp->xdr, sizeof(__be64)); in nfsd4_decode_clientid4()
557 nfsd4_decode_state_owner4(struct nfsd4_compoundargs *argp, in nfsd4_decode_state_owner4() argument
562 status = nfsd4_decode_clientid4(argp, clientid); in nfsd4_decode_state_owner4()
565 return nfsd4_decode_opaque(argp, owner); in nfsd4_decode_state_owner4()
570 nfsd4_decode_deviceid4(struct nfsd4_compoundargs *argp, in nfsd4_decode_deviceid4() argument
575 p = xdr_inline_decode(argp->xdr, NFS4_DEVICEID4_SIZE); in nfsd4_decode_deviceid4()
583 nfsd4_decode_layoutupdate4(struct nfsd4_compoundargs *argp, in nfsd4_decode_layoutupdate4() argument
586 if (xdr_stream_decode_u32(argp->xdr, &lcp->lc_layout_type) < 0) in nfsd4_decode_layoutupdate4()
593 if (xdr_stream_decode_u32(argp->xdr, &lcp->lc_up_len) < 0) in nfsd4_decode_layoutupdate4()
596 lcp->lc_up_layout = xdr_inline_decode(argp->xdr, lcp->lc_up_len); in nfsd4_decode_layoutupdate4()
605 nfsd4_decode_layoutreturn4(struct nfsd4_compoundargs *argp, in nfsd4_decode_layoutreturn4() argument
610 if (xdr_stream_decode_u32(argp->xdr, &lrp->lr_return_type) < 0) in nfsd4_decode_layoutreturn4()
614 if (xdr_stream_decode_u64(argp->xdr, &lrp->lr_seg.offset) < 0) in nfsd4_decode_layoutreturn4()
616 if (xdr_stream_decode_u64(argp->xdr, &lrp->lr_seg.length) < 0) in nfsd4_decode_layoutreturn4()
618 status = nfsd4_decode_stateid4(argp, &lrp->lr_sid); in nfsd4_decode_layoutreturn4()
621 if (xdr_stream_decode_u32(argp->xdr, &lrp->lrf_body_len) < 0) in nfsd4_decode_layoutreturn4()
624 lrp->lrf_body = xdr_inline_decode(argp->xdr, lrp->lrf_body_len); in nfsd4_decode_layoutreturn4()
644 nfsd4_decode_sessionid4(struct nfsd4_compoundargs *argp, in nfsd4_decode_sessionid4() argument
649 p = xdr_inline_decode(argp->xdr, NFS4_MAX_SESSIONID_LEN); in nfsd4_decode_sessionid4()
658 nfsd4_decode_authsys_parms(struct nfsd4_compoundargs *argp, in nfsd4_decode_authsys_parms() argument
664 if (xdr_stream_decode_u32(argp->xdr, &stamp) < 0) in nfsd4_decode_authsys_parms()
667 status = nfsd4_decode_ignored_string(argp, 255); in nfsd4_decode_authsys_parms()
670 if (xdr_stream_decode_u32(argp->xdr, &uid) < 0) in nfsd4_decode_authsys_parms()
672 if (xdr_stream_decode_u32(argp->xdr, &gid) < 0) in nfsd4_decode_authsys_parms()
674 if (xdr_stream_decode_u32(argp->xdr, &gidcount) < 0) in nfsd4_decode_authsys_parms()
678 p = xdr_inline_decode(argp->xdr, gidcount << 2); in nfsd4_decode_authsys_parms()
682 struct user_namespace *userns = nfsd_user_namespace(argp->rqstp); in nfsd4_decode_authsys_parms()
699 nfsd4_decode_gss_cb_handles4(struct nfsd4_compoundargs *argp, in nfsd4_decode_gss_cb_handles4() argument
707 if (xdr_stream_decode_u32(argp->xdr, &service) < 0) in nfsd4_decode_gss_cb_handles4()
712 status = nfsd4_decode_ignored_string(argp, 0); in nfsd4_decode_gss_cb_handles4()
716 status = nfsd4_decode_ignored_string(argp, 0); in nfsd4_decode_gss_cb_handles4()
725 nfsd4_decode_cb_sec(struct nfsd4_compoundargs *argp, struct nfsd4_cb_sec *cbs) in nfsd4_decode_cb_sec() argument
731 if (xdr_stream_decode_u32(argp->xdr, &nr_secflavs) < 0) in nfsd4_decode_cb_sec()
740 if (xdr_stream_decode_u32(argp->xdr, &secflavor) < 0) in nfsd4_decode_cb_sec()
749 status = nfsd4_decode_authsys_parms(argp, cbs); in nfsd4_decode_cb_sec()
754 status = nfsd4_decode_gss_cb_handles4(argp, cbs); in nfsd4_decode_cb_sec()
772 nfsd4_decode_access(struct nfsd4_compoundargs *argp, in nfsd4_decode_access() argument
776 if (xdr_stream_decode_u32(argp->xdr, &access->ac_req_access) < 0) in nfsd4_decode_access()
782 nfsd4_decode_close(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) in nfsd4_decode_close() argument
785 if (xdr_stream_decode_u32(argp->xdr, &close->cl_seqid) < 0) in nfsd4_decode_close()
787 return nfsd4_decode_stateid4(argp, &close->cl_stateid); in nfsd4_decode_close()
792 nfsd4_decode_commit(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) in nfsd4_decode_commit() argument
795 if (xdr_stream_decode_u64(argp->xdr, &commit->co_offset) < 0) in nfsd4_decode_commit()
797 if (xdr_stream_decode_u32(argp->xdr, &commit->co_count) < 0) in nfsd4_decode_commit()
804 nfsd4_decode_create(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) in nfsd4_decode_create() argument
810 if (xdr_stream_decode_u32(argp->xdr, &create->cr_type) < 0) in nfsd4_decode_create()
814 if (xdr_stream_decode_u32(argp->xdr, &create->cr_datalen) < 0) in nfsd4_decode_create()
816 p = xdr_inline_decode(argp->xdr, create->cr_datalen); in nfsd4_decode_create()
819 create->cr_data = svcxdr_dupstr(argp, p, create->cr_datalen); in nfsd4_decode_create()
825 if (xdr_stream_decode_u32(argp->xdr, &create->cr_specdata1) < 0) in nfsd4_decode_create()
827 if (xdr_stream_decode_u32(argp->xdr, &create->cr_specdata2) < 0) in nfsd4_decode_create()
836 status = nfsd4_decode_component4(argp, &create->cr_name, in nfsd4_decode_create()
840 status = nfsd4_decode_fattr4(argp, create->cr_bmval, in nfsd4_decode_create()
851 nfsd4_decode_delegreturn(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) in nfsd4_decode_delegreturn() argument
854 return nfsd4_decode_stateid4(argp, &dr->dr_stateid); in nfsd4_decode_delegreturn()
858 nfsd4_decode_getattr(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) in nfsd4_decode_getattr() argument
862 return nfsd4_decode_bitmap4(argp, getattr->ga_bmval, in nfsd4_decode_getattr()
867 nfsd4_decode_link(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) in nfsd4_decode_link() argument
871 return nfsd4_decode_component4(argp, &link->li_name, &link->li_namelen); in nfsd4_decode_link()
875 nfsd4_decode_open_to_lock_owner4(struct nfsd4_compoundargs *argp, in nfsd4_decode_open_to_lock_owner4() argument
880 if (xdr_stream_decode_u32(argp->xdr, &lock->lk_new_open_seqid) < 0) in nfsd4_decode_open_to_lock_owner4()
882 status = nfsd4_decode_stateid4(argp, &lock->lk_new_open_stateid); in nfsd4_decode_open_to_lock_owner4()
885 if (xdr_stream_decode_u32(argp->xdr, &lock->lk_new_lock_seqid) < 0) in nfsd4_decode_open_to_lock_owner4()
887 return nfsd4_decode_state_owner4(argp, &lock->lk_new_clientid, in nfsd4_decode_open_to_lock_owner4()
892 nfsd4_decode_exist_lock_owner4(struct nfsd4_compoundargs *argp, in nfsd4_decode_exist_lock_owner4() argument
897 status = nfsd4_decode_stateid4(argp, &lock->lk_old_lock_stateid); in nfsd4_decode_exist_lock_owner4()
900 if (xdr_stream_decode_u32(argp->xdr, &lock->lk_old_lock_seqid) < 0) in nfsd4_decode_exist_lock_owner4()
907 nfsd4_decode_locker4(struct nfsd4_compoundargs *argp, struct nfsd4_lock *lock) in nfsd4_decode_locker4() argument
909 if (xdr_stream_decode_bool(argp->xdr, &lock->lk_is_new) < 0) in nfsd4_decode_locker4()
912 return nfsd4_decode_open_to_lock_owner4(argp, lock); in nfsd4_decode_locker4()
913 return nfsd4_decode_exist_lock_owner4(argp, lock); in nfsd4_decode_locker4()
917 nfsd4_decode_lock(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) in nfsd4_decode_lock() argument
921 if (xdr_stream_decode_u32(argp->xdr, &lock->lk_type) < 0) in nfsd4_decode_lock()
925 if (xdr_stream_decode_bool(argp->xdr, &lock->lk_reclaim) < 0) in nfsd4_decode_lock()
927 if (xdr_stream_decode_u64(argp->xdr, &lock->lk_offset) < 0) in nfsd4_decode_lock()
929 if (xdr_stream_decode_u64(argp->xdr, &lock->lk_length) < 0) in nfsd4_decode_lock()
931 return nfsd4_decode_locker4(argp, lock); in nfsd4_decode_lock()
935 nfsd4_decode_lockt(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) in nfsd4_decode_lockt() argument
939 if (xdr_stream_decode_u32(argp->xdr, &lockt->lt_type) < 0) in nfsd4_decode_lockt()
943 if (xdr_stream_decode_u64(argp->xdr, &lockt->lt_offset) < 0) in nfsd4_decode_lockt()
945 if (xdr_stream_decode_u64(argp->xdr, &lockt->lt_length) < 0) in nfsd4_decode_lockt()
947 return nfsd4_decode_state_owner4(argp, &lockt->lt_clientid, in nfsd4_decode_lockt()
952 nfsd4_decode_locku(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) in nfsd4_decode_locku() argument
957 if (xdr_stream_decode_u32(argp->xdr, &locku->lu_type) < 0) in nfsd4_decode_locku()
961 if (xdr_stream_decode_u32(argp->xdr, &locku->lu_seqid) < 0) in nfsd4_decode_locku()
963 status = nfsd4_decode_stateid4(argp, &locku->lu_stateid); in nfsd4_decode_locku()
966 if (xdr_stream_decode_u64(argp->xdr, &locku->lu_offset) < 0) in nfsd4_decode_locku()
968 if (xdr_stream_decode_u64(argp->xdr, &locku->lu_length) < 0) in nfsd4_decode_locku()
975 nfsd4_decode_lookup(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) in nfsd4_decode_lookup() argument
978 return nfsd4_decode_component4(argp, &lookup->lo_name, &lookup->lo_len); in nfsd4_decode_lookup()
982 nfsd4_decode_createhow4(struct nfsd4_compoundargs *argp, struct nfsd4_open *open) in nfsd4_decode_createhow4() argument
986 if (xdr_stream_decode_u32(argp->xdr, &open->op_createmode) < 0) in nfsd4_decode_createhow4()
991 status = nfsd4_decode_fattr4(argp, open->op_bmval, in nfsd4_decode_createhow4()
999 status = nfsd4_decode_verifier4(argp, &open->op_verf); in nfsd4_decode_createhow4()
1004 if (argp->minorversion < 1) in nfsd4_decode_createhow4()
1006 status = nfsd4_decode_verifier4(argp, &open->op_verf); in nfsd4_decode_createhow4()
1009 status = nfsd4_decode_fattr4(argp, open->op_bmval, in nfsd4_decode_createhow4()
1024 nfsd4_decode_openflag4(struct nfsd4_compoundargs *argp, struct nfsd4_open *open) in nfsd4_decode_openflag4() argument
1028 if (xdr_stream_decode_u32(argp->xdr, &open->op_create) < 0) in nfsd4_decode_openflag4()
1034 status = nfsd4_decode_createhow4(argp, open); in nfsd4_decode_openflag4()
1045 static __be32 nfsd4_decode_share_access(struct nfsd4_compoundargs *argp, u32 *share_access, u32 *de… in nfsd4_decode_share_access() argument
1049 if (xdr_stream_decode_u32(argp->xdr, &w) < 0) in nfsd4_decode_share_access()
1067 if (!argp->minorversion) in nfsd4_decode_share_access()
1096 static __be32 nfsd4_decode_share_deny(struct nfsd4_compoundargs *argp, u32 *x) in nfsd4_decode_share_deny() argument
1098 if (xdr_stream_decode_u32(argp->xdr, x) < 0) in nfsd4_decode_share_deny()
1108 nfsd4_decode_open_claim4(struct nfsd4_compoundargs *argp, in nfsd4_decode_open_claim4() argument
1113 if (xdr_stream_decode_u32(argp->xdr, &open->op_claim_type) < 0) in nfsd4_decode_open_claim4()
1118 status = nfsd4_decode_component4(argp, &open->op_fname, in nfsd4_decode_open_claim4()
1124 if (xdr_stream_decode_u32(argp->xdr, &open->op_delegate_type) < 0) in nfsd4_decode_open_claim4()
1128 status = nfsd4_decode_stateid4(argp, &open->op_delegate_stateid); in nfsd4_decode_open_claim4()
1131 status = nfsd4_decode_component4(argp, &open->op_fname, in nfsd4_decode_open_claim4()
1138 if (argp->minorversion < 1) in nfsd4_decode_open_claim4()
1143 if (argp->minorversion < 1) in nfsd4_decode_open_claim4()
1145 status = nfsd4_decode_stateid4(argp, &open->op_delegate_stateid); in nfsd4_decode_open_claim4()
1157 nfsd4_decode_open(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) in nfsd4_decode_open() argument
1165 if (xdr_stream_decode_u32(argp->xdr, &open->op_seqid) < 0) in nfsd4_decode_open()
1168 status = nfsd4_decode_share_access(argp, &open->op_share_access, in nfsd4_decode_open()
1172 status = nfsd4_decode_share_deny(argp, &open->op_share_deny); in nfsd4_decode_open()
1175 status = nfsd4_decode_state_owner4(argp, &open->op_clientid, in nfsd4_decode_open()
1179 status = nfsd4_decode_openflag4(argp, open); in nfsd4_decode_open()
1182 return nfsd4_decode_open_claim4(argp, open); in nfsd4_decode_open()
1186 nfsd4_decode_open_confirm(struct nfsd4_compoundargs *argp, in nfsd4_decode_open_confirm() argument
1192 if (argp->minorversion >= 1) in nfsd4_decode_open_confirm()
1195 status = nfsd4_decode_stateid4(argp, &open_conf->oc_req_stateid); in nfsd4_decode_open_confirm()
1198 if (xdr_stream_decode_u32(argp->xdr, &open_conf->oc_seqid) < 0) in nfsd4_decode_open_confirm()
1207 nfsd4_decode_open_downgrade(struct nfsd4_compoundargs *argp, in nfsd4_decode_open_downgrade() argument
1214 status = nfsd4_decode_stateid4(argp, &open_down->od_stateid); in nfsd4_decode_open_downgrade()
1217 if (xdr_stream_decode_u32(argp->xdr, &open_down->od_seqid) < 0) in nfsd4_decode_open_downgrade()
1220 status = nfsd4_decode_share_access(argp, &open_down->od_share_access, in nfsd4_decode_open_downgrade()
1224 return nfsd4_decode_share_deny(argp, &open_down->od_share_deny); in nfsd4_decode_open_downgrade()
1228 nfsd4_decode_putfh(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) in nfsd4_decode_putfh() argument
1233 if (xdr_stream_decode_u32(argp->xdr, &putfh->pf_fhlen) < 0) in nfsd4_decode_putfh()
1237 p = xdr_inline_decode(argp->xdr, putfh->pf_fhlen); in nfsd4_decode_putfh()
1240 putfh->pf_fhval = svcxdr_savemem(argp, p, putfh->pf_fhlen); in nfsd4_decode_putfh()
1249 nfsd4_decode_putpubfh(struct nfsd4_compoundargs *argp, union nfsd4_op_u *p) in nfsd4_decode_putpubfh() argument
1251 if (argp->minorversion == 0) in nfsd4_decode_putpubfh()
1257 nfsd4_decode_read(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) in nfsd4_decode_read() argument
1263 status = nfsd4_decode_stateid4(argp, &read->rd_stateid); in nfsd4_decode_read()
1266 if (xdr_stream_decode_u64(argp->xdr, &read->rd_offset) < 0) in nfsd4_decode_read()
1268 if (xdr_stream_decode_u32(argp->xdr, &read->rd_length) < 0) in nfsd4_decode_read()
1275 nfsd4_decode_readdir(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) in nfsd4_decode_readdir() argument
1281 if (xdr_stream_decode_u64(argp->xdr, &readdir->rd_cookie) < 0) in nfsd4_decode_readdir()
1283 status = nfsd4_decode_verifier4(argp, &readdir->rd_verf); in nfsd4_decode_readdir()
1286 if (xdr_stream_decode_u32(argp->xdr, &readdir->rd_dircount) < 0) in nfsd4_decode_readdir()
1288 if (xdr_stream_decode_u32(argp->xdr, &readdir->rd_maxcount) < 0) in nfsd4_decode_readdir()
1290 if (xdr_stream_decode_uint32_array(argp->xdr, readdir->rd_bmval, in nfsd4_decode_readdir()
1298 nfsd4_decode_remove(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) in nfsd4_decode_remove() argument
1302 return nfsd4_decode_component4(argp, &remove->rm_name, &remove->rm_namelen); in nfsd4_decode_remove()
1306 nfsd4_decode_rename(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) in nfsd4_decode_rename() argument
1312 status = nfsd4_decode_component4(argp, &rename->rn_sname, &rename->rn_snamelen); in nfsd4_decode_rename()
1315 return nfsd4_decode_component4(argp, &rename->rn_tname, &rename->rn_tnamelen); in nfsd4_decode_rename()
1319 nfsd4_decode_renew(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) in nfsd4_decode_renew() argument
1322 return nfsd4_decode_clientid4(argp, clientid); in nfsd4_decode_renew()
1326 nfsd4_decode_secinfo(struct nfsd4_compoundargs *argp, in nfsd4_decode_secinfo() argument
1331 return nfsd4_decode_component4(argp, &secinfo->si_name, &secinfo->si_namelen); in nfsd4_decode_secinfo()
1335 nfsd4_decode_setattr(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) in nfsd4_decode_setattr() argument
1341 status = nfsd4_decode_stateid4(argp, &setattr->sa_stateid); in nfsd4_decode_setattr()
1344 return nfsd4_decode_fattr4(argp, setattr->sa_bmval, in nfsd4_decode_setattr()
1351 nfsd4_decode_setclientid(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) in nfsd4_decode_setclientid() argument
1358 if (argp->minorversion >= 1) in nfsd4_decode_setclientid()
1361 status = nfsd4_decode_verifier4(argp, &setclientid->se_verf); in nfsd4_decode_setclientid()
1364 status = nfsd4_decode_opaque(argp, &setclientid->se_name); in nfsd4_decode_setclientid()
1367 if (xdr_stream_decode_u32(argp->xdr, &setclientid->se_callback_prog) < 0) in nfsd4_decode_setclientid()
1369 if (xdr_stream_decode_u32(argp->xdr, &setclientid->se_callback_netid_len) < 0) in nfsd4_decode_setclientid()
1371 p = xdr_inline_decode(argp->xdr, setclientid->se_callback_netid_len); in nfsd4_decode_setclientid()
1374 setclientid->se_callback_netid_val = svcxdr_savemem(argp, p, in nfsd4_decode_setclientid()
1379 if (xdr_stream_decode_u32(argp->xdr, &setclientid->se_callback_addr_len) < 0) in nfsd4_decode_setclientid()
1381 p = xdr_inline_decode(argp->xdr, setclientid->se_callback_addr_len); in nfsd4_decode_setclientid()
1384 setclientid->se_callback_addr_val = svcxdr_savemem(argp, p, in nfsd4_decode_setclientid()
1388 if (xdr_stream_decode_u32(argp->xdr, &setclientid->se_callback_ident) < 0) in nfsd4_decode_setclientid()
1395 nfsd4_decode_setclientid_confirm(struct nfsd4_compoundargs *argp, in nfsd4_decode_setclientid_confirm() argument
1401 if (argp->minorversion >= 1) in nfsd4_decode_setclientid_confirm()
1404 status = nfsd4_decode_clientid4(argp, &scd_c->sc_clientid); in nfsd4_decode_setclientid_confirm()
1407 return nfsd4_decode_verifier4(argp, &scd_c->sc_confirm); in nfsd4_decode_setclientid_confirm()
1412 nfsd4_decode_verify(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) in nfsd4_decode_verify() argument
1419 status = nfsd4_decode_bitmap4(argp, verify->ve_bmval, in nfsd4_decode_verify()
1427 if (xdr_stream_decode_u32(argp->xdr, &verify->ve_attrlen) < 0) in nfsd4_decode_verify()
1429 p = xdr_inline_decode(argp->xdr, verify->ve_attrlen); in nfsd4_decode_verify()
1432 verify->ve_attrval = svcxdr_savemem(argp, p, verify->ve_attrlen); in nfsd4_decode_verify()
1440 nfsd4_decode_write(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) in nfsd4_decode_write() argument
1445 status = nfsd4_decode_stateid4(argp, &write->wr_stateid); in nfsd4_decode_write()
1448 if (xdr_stream_decode_u64(argp->xdr, &write->wr_offset) < 0) in nfsd4_decode_write()
1450 if (xdr_stream_decode_u32(argp->xdr, &write->wr_stable_how) < 0) in nfsd4_decode_write()
1454 if (xdr_stream_decode_u32(argp->xdr, &write->wr_buflen) < 0) in nfsd4_decode_write()
1456 if (!xdr_stream_subsegment(argp->xdr, &write->wr_payload, write->wr_buflen)) in nfsd4_decode_write()
1466 nfsd4_decode_release_lockowner(struct nfsd4_compoundargs *argp, in nfsd4_decode_release_lockowner() argument
1472 if (argp->minorversion >= 1) in nfsd4_decode_release_lockowner()
1475 status = nfsd4_decode_state_owner4(argp, &rlockowner->rl_clientid, in nfsd4_decode_release_lockowner()
1480 if (argp->minorversion && !zero_clientid(&rlockowner->rl_clientid)) in nfsd4_decode_release_lockowner()
1486 static __be32 nfsd4_decode_backchannel_ctl(struct nfsd4_compoundargs *argp, in nfsd4_decode_backchannel_ctl() argument
1491 if (xdr_stream_decode_u32(argp->xdr, &bc->bc_cb_program) < 0) in nfsd4_decode_backchannel_ctl()
1493 return nfsd4_decode_cb_sec(argp, &bc->bc_cb_sec); in nfsd4_decode_backchannel_ctl()
1496 static __be32 nfsd4_decode_bind_conn_to_session(struct nfsd4_compoundargs *argp, in nfsd4_decode_bind_conn_to_session() argument
1504 status = nfsd4_decode_sessionid4(argp, &bcts->sessionid); in nfsd4_decode_bind_conn_to_session()
1507 if (xdr_stream_decode_u32(argp->xdr, &bcts->dir) < 0) in nfsd4_decode_bind_conn_to_session()
1509 if (xdr_stream_decode_u32(argp->xdr, &use_conn_in_rdma_mode) < 0) in nfsd4_decode_bind_conn_to_session()
1516 nfsd4_decode_state_protect_ops(struct nfsd4_compoundargs *argp, in nfsd4_decode_state_protect_ops() argument
1521 status = nfsd4_decode_bitmap4(argp, exid->spo_must_enforce, in nfsd4_decode_state_protect_ops()
1525 status = nfsd4_decode_bitmap4(argp, exid->spo_must_allow, in nfsd4_decode_state_protect_ops()
1538 nfsd4_decode_ssv_sp_parms(struct nfsd4_compoundargs *argp, in nfsd4_decode_ssv_sp_parms() argument
1545 status = nfsd4_decode_state_protect_ops(argp, exid); in nfsd4_decode_ssv_sp_parms()
1550 if (xdr_stream_decode_u32(argp->xdr, &count) < 0) in nfsd4_decode_ssv_sp_parms()
1553 status = nfsd4_decode_ignored_string(argp, 0); in nfsd4_decode_ssv_sp_parms()
1559 if (xdr_stream_decode_u32(argp->xdr, &count) < 0) in nfsd4_decode_ssv_sp_parms()
1562 status = nfsd4_decode_ignored_string(argp, 0); in nfsd4_decode_ssv_sp_parms()
1567 if (xdr_stream_decode_u32(argp->xdr, &window) < 0) in nfsd4_decode_ssv_sp_parms()
1569 if (xdr_stream_decode_u32(argp->xdr, &num_gss_handles) < 0) in nfsd4_decode_ssv_sp_parms()
1576 nfsd4_decode_state_protect4_a(struct nfsd4_compoundargs *argp, in nfsd4_decode_state_protect4_a() argument
1581 if (xdr_stream_decode_u32(argp->xdr, &exid->spa_how) < 0) in nfsd4_decode_state_protect4_a()
1587 status = nfsd4_decode_state_protect_ops(argp, exid); in nfsd4_decode_state_protect4_a()
1592 status = nfsd4_decode_ssv_sp_parms(argp, exid); in nfsd4_decode_state_protect4_a()
1604 nfsd4_decode_nfs_impl_id4(struct nfsd4_compoundargs *argp, in nfsd4_decode_nfs_impl_id4() argument
1610 if (xdr_stream_decode_u32(argp->xdr, &count) < 0) in nfsd4_decode_nfs_impl_id4()
1619 status = nfsd4_decode_opaque(argp, &exid->nii_domain); in nfsd4_decode_nfs_impl_id4()
1625 status = nfsd4_decode_opaque(argp, &exid->nii_name); in nfsd4_decode_nfs_impl_id4()
1628 status = nfsd4_decode_nfstime4(argp, &exid->nii_time); in nfsd4_decode_nfs_impl_id4()
1640 nfsd4_decode_exchange_id(struct nfsd4_compoundargs *argp, in nfsd4_decode_exchange_id() argument
1647 status = nfsd4_decode_verifier4(argp, &exid->verifier); in nfsd4_decode_exchange_id()
1650 status = nfsd4_decode_opaque(argp, &exid->clname); in nfsd4_decode_exchange_id()
1653 if (xdr_stream_decode_u32(argp->xdr, &exid->flags) < 0) in nfsd4_decode_exchange_id()
1655 status = nfsd4_decode_state_protect4_a(argp, exid); in nfsd4_decode_exchange_id()
1658 return nfsd4_decode_nfs_impl_id4(argp, exid); in nfsd4_decode_exchange_id()
1662 nfsd4_decode_channel_attrs4(struct nfsd4_compoundargs *argp, in nfsd4_decode_channel_attrs4() argument
1667 p = xdr_inline_decode(argp->xdr, XDR_UNIT * 7); in nfsd4_decode_channel_attrs4()
1683 if (xdr_stream_decode_u32(argp->xdr, &ca->rdma_attrs) < 0) in nfsd4_decode_channel_attrs4()
1694 nfsd4_decode_create_session(struct nfsd4_compoundargs *argp, in nfsd4_decode_create_session() argument
1701 status = nfsd4_decode_clientid4(argp, &sess->clientid); in nfsd4_decode_create_session()
1704 if (xdr_stream_decode_u32(argp->xdr, &sess->seqid) < 0) in nfsd4_decode_create_session()
1706 if (xdr_stream_decode_u32(argp->xdr, &sess->flags) < 0) in nfsd4_decode_create_session()
1708 status = nfsd4_decode_channel_attrs4(argp, &sess->fore_channel); in nfsd4_decode_create_session()
1711 status = nfsd4_decode_channel_attrs4(argp, &sess->back_channel); in nfsd4_decode_create_session()
1714 if (xdr_stream_decode_u32(argp->xdr, &sess->callback_prog) < 0) in nfsd4_decode_create_session()
1716 return nfsd4_decode_cb_sec(argp, &sess->cb_sec); in nfsd4_decode_create_session()
1720 nfsd4_decode_destroy_session(struct nfsd4_compoundargs *argp, in nfsd4_decode_destroy_session() argument
1724 return nfsd4_decode_sessionid4(argp, &destroy_session->sessionid); in nfsd4_decode_destroy_session()
1728 nfsd4_decode_free_stateid(struct nfsd4_compoundargs *argp, in nfsd4_decode_free_stateid() argument
1732 return nfsd4_decode_stateid4(argp, &free_stateid->fr_stateid); in nfsd4_decode_free_stateid()
1737 nfsd4_decode_getdeviceinfo(struct nfsd4_compoundargs *argp, in nfsd4_decode_getdeviceinfo() argument
1744 status = nfsd4_decode_deviceid4(argp, &gdev->gd_devid); in nfsd4_decode_getdeviceinfo()
1747 if (xdr_stream_decode_u32(argp->xdr, &gdev->gd_layout_type) < 0) in nfsd4_decode_getdeviceinfo()
1749 if (xdr_stream_decode_u32(argp->xdr, &gdev->gd_maxcount) < 0) in nfsd4_decode_getdeviceinfo()
1751 if (xdr_stream_decode_uint32_array(argp->xdr, in nfsd4_decode_getdeviceinfo()
1759 nfsd4_decode_layoutcommit(struct nfsd4_compoundargs *argp, in nfsd4_decode_layoutcommit() argument
1766 if (xdr_stream_decode_u64(argp->xdr, &lcp->lc_seg.offset) < 0) in nfsd4_decode_layoutcommit()
1768 if (xdr_stream_decode_u64(argp->xdr, &lcp->lc_seg.length) < 0) in nfsd4_decode_layoutcommit()
1770 if (xdr_stream_decode_bool(argp->xdr, &lcp->lc_reclaim) < 0) in nfsd4_decode_layoutcommit()
1772 status = nfsd4_decode_stateid4(argp, &lcp->lc_sid); in nfsd4_decode_layoutcommit()
1775 if (xdr_stream_decode_u32(argp->xdr, &lcp->lc_newoffset) < 0) in nfsd4_decode_layoutcommit()
1778 if (xdr_stream_decode_u64(argp->xdr, &lcp->lc_last_wr) < 0) in nfsd4_decode_layoutcommit()
1782 p = xdr_inline_decode(argp->xdr, XDR_UNIT); in nfsd4_decode_layoutcommit()
1786 status = nfsd4_decode_nfstime4(argp, &lcp->lc_mtime); in nfsd4_decode_layoutcommit()
1792 return nfsd4_decode_layoutupdate4(argp, lcp); in nfsd4_decode_layoutcommit()
1796 nfsd4_decode_layoutget(struct nfsd4_compoundargs *argp, in nfsd4_decode_layoutget() argument
1803 if (xdr_stream_decode_u32(argp->xdr, &lgp->lg_signal) < 0) in nfsd4_decode_layoutget()
1805 if (xdr_stream_decode_u32(argp->xdr, &lgp->lg_layout_type) < 0) in nfsd4_decode_layoutget()
1807 if (xdr_stream_decode_u32(argp->xdr, &lgp->lg_seg.iomode) < 0) in nfsd4_decode_layoutget()
1809 if (xdr_stream_decode_u64(argp->xdr, &lgp->lg_seg.offset) < 0) in nfsd4_decode_layoutget()
1811 if (xdr_stream_decode_u64(argp->xdr, &lgp->lg_seg.length) < 0) in nfsd4_decode_layoutget()
1813 if (xdr_stream_decode_u64(argp->xdr, &lgp->lg_minlength) < 0) in nfsd4_decode_layoutget()
1815 status = nfsd4_decode_stateid4(argp, &lgp->lg_sid); in nfsd4_decode_layoutget()
1818 if (xdr_stream_decode_u32(argp->xdr, &lgp->lg_maxcount) < 0) in nfsd4_decode_layoutget()
1825 nfsd4_decode_layoutreturn(struct nfsd4_compoundargs *argp, in nfsd4_decode_layoutreturn() argument
1830 if (xdr_stream_decode_bool(argp->xdr, &lrp->lr_reclaim) < 0) in nfsd4_decode_layoutreturn()
1832 if (xdr_stream_decode_u32(argp->xdr, &lrp->lr_layout_type) < 0) in nfsd4_decode_layoutreturn()
1834 if (xdr_stream_decode_u32(argp->xdr, &lrp->lr_seg.iomode) < 0) in nfsd4_decode_layoutreturn()
1836 return nfsd4_decode_layoutreturn4(argp, lrp); in nfsd4_decode_layoutreturn()
1840 static __be32 nfsd4_decode_secinfo_no_name(struct nfsd4_compoundargs *argp, in nfsd4_decode_secinfo_no_name() argument
1844 if (xdr_stream_decode_u32(argp->xdr, &sin->sin_style) < 0) in nfsd4_decode_secinfo_no_name()
1852 nfsd4_decode_sequence(struct nfsd4_compoundargs *argp, in nfsd4_decode_sequence() argument
1858 status = nfsd4_decode_sessionid4(argp, &seq->sessionid); in nfsd4_decode_sequence()
1861 p = xdr_inline_decode(argp->xdr, XDR_UNIT * 4); in nfsd4_decode_sequence()
1874 nfsd4_decode_test_stateid(struct nfsd4_compoundargs *argp, in nfsd4_decode_test_stateid() argument
1883 if (xdr_stream_decode_u32(argp->xdr, &test_stateid->ts_num_ids) < 0) in nfsd4_decode_test_stateid()
1888 stateid = svcxdr_tmpalloc(argp, sizeof(*stateid)); in nfsd4_decode_test_stateid()
1893 status = nfsd4_decode_stateid4(argp, &stateid->ts_id_stateid); in nfsd4_decode_test_stateid()
1901 static __be32 nfsd4_decode_destroy_clientid(struct nfsd4_compoundargs *argp, in nfsd4_decode_destroy_clientid() argument
1905 return nfsd4_decode_clientid4(argp, &dc->clientid); in nfsd4_decode_destroy_clientid()
1908 static __be32 nfsd4_decode_reclaim_complete(struct nfsd4_compoundargs *argp, in nfsd4_decode_reclaim_complete() argument
1912 if (xdr_stream_decode_bool(argp->xdr, &rc->rca_one_fs) < 0) in nfsd4_decode_reclaim_complete()
1918 nfsd4_decode_fallocate(struct nfsd4_compoundargs *argp, in nfsd4_decode_fallocate() argument
1924 status = nfsd4_decode_stateid4(argp, &fallocate->falloc_stateid); in nfsd4_decode_fallocate()
1927 if (xdr_stream_decode_u64(argp->xdr, &fallocate->falloc_offset) < 0) in nfsd4_decode_fallocate()
1929 if (xdr_stream_decode_u64(argp->xdr, &fallocate->falloc_length) < 0) in nfsd4_decode_fallocate()
1935 static __be32 nfsd4_decode_nl4_server(struct nfsd4_compoundargs *argp, in nfsd4_decode_nl4_server() argument
1941 if (xdr_stream_decode_u32(argp->xdr, &ns->nl4_type) < 0) in nfsd4_decode_nl4_server()
1949 if (xdr_stream_decode_u32(argp->xdr, &naddr->netid_len) < 0) in nfsd4_decode_nl4_server()
1954 p = xdr_inline_decode(argp->xdr, naddr->netid_len); in nfsd4_decode_nl4_server()
1959 if (xdr_stream_decode_u32(argp->xdr, &naddr->addr_len) < 0) in nfsd4_decode_nl4_server()
1964 p = xdr_inline_decode(argp->xdr, naddr->addr_len); in nfsd4_decode_nl4_server()
1977 nfsd4_decode_copy(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) in nfsd4_decode_copy() argument
1985 status = nfsd4_decode_stateid4(argp, &copy->cp_src_stateid); in nfsd4_decode_copy()
1988 status = nfsd4_decode_stateid4(argp, &copy->cp_dst_stateid); in nfsd4_decode_copy()
1991 if (xdr_stream_decode_u64(argp->xdr, &copy->cp_src_pos) < 0) in nfsd4_decode_copy()
1993 if (xdr_stream_decode_u64(argp->xdr, &copy->cp_dst_pos) < 0) in nfsd4_decode_copy()
1995 if (xdr_stream_decode_u64(argp->xdr, &copy->cp_count) < 0) in nfsd4_decode_copy()
1998 if (xdr_stream_decode_u32(argp->xdr, &consecutive) < 0) in nfsd4_decode_copy()
2000 if (xdr_stream_decode_bool(argp->xdr, &sync) < 0) in nfsd4_decode_copy()
2004 if (xdr_stream_decode_u32(argp->xdr, &count) < 0) in nfsd4_decode_copy()
2006 copy->cp_src = svcxdr_tmpalloc(argp, sizeof(*copy->cp_src)); in nfsd4_decode_copy()
2015 status = nfsd4_decode_nl4_server(argp, copy->cp_src); in nfsd4_decode_copy()
2023 status = nfsd4_decode_nl4_server(argp, ns_dummy); in nfsd4_decode_copy()
2035 nfsd4_decode_copy_notify(struct nfsd4_compoundargs *argp, in nfsd4_decode_copy_notify() argument
2042 cn->cpn_src = svcxdr_tmpalloc(argp, sizeof(*cn->cpn_src)); in nfsd4_decode_copy_notify()
2045 cn->cpn_dst = svcxdr_tmpalloc(argp, sizeof(*cn->cpn_dst)); in nfsd4_decode_copy_notify()
2049 status = nfsd4_decode_stateid4(argp, &cn->cpn_src_stateid); in nfsd4_decode_copy_notify()
2052 return nfsd4_decode_nl4_server(argp, cn->cpn_dst); in nfsd4_decode_copy_notify()
2056 nfsd4_decode_offload_status(struct nfsd4_compoundargs *argp, in nfsd4_decode_offload_status() argument
2062 return nfsd4_decode_stateid4(argp, &os->stateid); in nfsd4_decode_offload_status()
2066 nfsd4_decode_seek(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) in nfsd4_decode_seek() argument
2071 status = nfsd4_decode_stateid4(argp, &seek->seek_stateid); in nfsd4_decode_seek()
2074 if (xdr_stream_decode_u64(argp->xdr, &seek->seek_offset) < 0) in nfsd4_decode_seek()
2076 if (xdr_stream_decode_u32(argp->xdr, &seek->seek_whence) < 0) in nfsd4_decode_seek()
2085 nfsd4_decode_clone(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) in nfsd4_decode_clone() argument
2090 status = nfsd4_decode_stateid4(argp, &clone->cl_src_stateid); in nfsd4_decode_clone()
2093 status = nfsd4_decode_stateid4(argp, &clone->cl_dst_stateid); in nfsd4_decode_clone()
2096 if (xdr_stream_decode_u64(argp->xdr, &clone->cl_src_pos) < 0) in nfsd4_decode_clone()
2098 if (xdr_stream_decode_u64(argp->xdr, &clone->cl_dst_pos) < 0) in nfsd4_decode_clone()
2100 if (xdr_stream_decode_u64(argp->xdr, &clone->cl_count) < 0) in nfsd4_decode_clone()
2119 nfsd4_vbuf_from_vector(struct nfsd4_compoundargs *argp, struct xdr_buf *xdr, in nfsd4_vbuf_from_vector() argument
2136 tmp = svcxdr_tmpalloc(argp, buflen); in nfsd4_vbuf_from_vector()
2164 nfsd4_decode_xattr_name(struct nfsd4_compoundargs *argp, char **namep) in nfsd4_decode_xattr_name() argument
2170 if (xdr_stream_decode_u32(argp->xdr, &namelen) < 0) in nfsd4_decode_xattr_name()
2176 p = xdr_inline_decode(argp->xdr, namelen); in nfsd4_decode_xattr_name()
2179 name = svcxdr_tmpalloc(argp, namelen + XATTR_USER_PREFIX_LEN + 1); in nfsd4_decode_xattr_name()
2211 nfsd4_decode_getxattr(struct nfsd4_compoundargs *argp, in nfsd4_decode_getxattr() argument
2219 status = nfsd4_decode_xattr_name(argp, &getxattr->getxa_name); in nfsd4_decode_getxattr()
2223 maxcount = svc_max_payload(argp->rqstp); in nfsd4_decode_getxattr()
2231 nfsd4_decode_setxattr(struct nfsd4_compoundargs *argp, in nfsd4_decode_setxattr() argument
2240 if (xdr_stream_decode_u32(argp->xdr, &flags) < 0) in nfsd4_decode_setxattr()
2247 status = nfsd4_decode_xattr_name(argp, &setxattr->setxa_name); in nfsd4_decode_setxattr()
2251 maxcount = svc_max_payload(argp->rqstp); in nfsd4_decode_setxattr()
2254 if (xdr_stream_decode_u32(argp->xdr, &size) < 0) in nfsd4_decode_setxattr()
2263 if (!xdr_stream_subsegment(argp->xdr, &payload, size)) in nfsd4_decode_setxattr()
2265 status = nfsd4_vbuf_from_vector(argp, &payload, in nfsd4_decode_setxattr()
2273 nfsd4_decode_listxattrs(struct nfsd4_compoundargs *argp, in nfsd4_decode_listxattrs() argument
2281 if (xdr_stream_decode_u64(argp->xdr, &listxattrs->lsxa_cookie) < 0) in nfsd4_decode_listxattrs()
2292 if (xdr_stream_decode_u32(argp->xdr, &maxcount) < 0) in nfsd4_decode_listxattrs()
2298 maxcount = min(maxcount, svc_max_payload(argp->rqstp)); in nfsd4_decode_listxattrs()
2305 nfsd4_decode_removexattr(struct nfsd4_compoundargs *argp, in nfsd4_decode_removexattr() argument
2310 return nfsd4_decode_xattr_name(argp, &removexattr->rmxa_name); in nfsd4_decode_removexattr()
2314 nfsd4_decode_noop(struct nfsd4_compoundargs *argp, union nfsd4_op_u *p) in nfsd4_decode_noop() argument
2320 nfsd4_decode_notsupp(struct nfsd4_compoundargs *argp, union nfsd4_op_u *p) in nfsd4_decode_notsupp() argument
2325 typedef __be32(*nfsd4_dec)(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u);
2417 nfsd4_opnum_in_range(struct nfsd4_compoundargs *argp, struct nfsd4_op *op) in nfsd4_opnum_in_range() argument
2421 else if (argp->minorversion == 0 && op->opnum > LAST_NFS40_OP) in nfsd4_opnum_in_range()
2423 else if (argp->minorversion == 1 && op->opnum > LAST_NFS41_OP) in nfsd4_opnum_in_range()
2425 else if (argp->minorversion == 2 && op->opnum > LAST_NFS42_OP) in nfsd4_opnum_in_range()
2431 nfsd4_decode_compound(struct nfsd4_compoundargs *argp) in nfsd4_decode_compound() argument
2435 int auth_slack= argp->rqstp->rq_auth_slack; in nfsd4_decode_compound()
2442 if (xdr_stream_decode_u32(argp->xdr, &argp->taglen) < 0) in nfsd4_decode_compound()
2445 argp->tag = NULL; in nfsd4_decode_compound()
2446 if (unlikely(argp->taglen)) { in nfsd4_decode_compound()
2447 if (argp->taglen > NFSD4_MAX_TAGLEN) in nfsd4_decode_compound()
2449 p = xdr_inline_decode(argp->xdr, argp->taglen); in nfsd4_decode_compound()
2452 argp->tag = svcxdr_savemem(argp, p, argp->taglen); in nfsd4_decode_compound()
2453 if (!argp->tag) in nfsd4_decode_compound()
2455 max_reply += xdr_align_size(argp->taglen); in nfsd4_decode_compound()
2458 if (xdr_stream_decode_u32(argp->xdr, &argp->minorversion) < 0) in nfsd4_decode_compound()
2460 if (xdr_stream_decode_u32(argp->xdr, &argp->client_opcnt) < 0) in nfsd4_decode_compound()
2462 argp->opcnt = min_t(u32, argp->client_opcnt, in nfsd4_decode_compound()
2465 if (argp->opcnt > ARRAY_SIZE(argp->iops)) { in nfsd4_decode_compound()
2466 argp->ops = vcalloc(argp->opcnt, sizeof(*argp->ops)); in nfsd4_decode_compound()
2467 if (!argp->ops) { in nfsd4_decode_compound()
2468 argp->ops = argp->iops; in nfsd4_decode_compound()
2473 if (argp->minorversion > NFSD_SUPPORTED_MINOR_VERSION) in nfsd4_decode_compound()
2474 argp->opcnt = 0; in nfsd4_decode_compound()
2476 for (i = 0; i < argp->opcnt; i++) { in nfsd4_decode_compound()
2477 op = &argp->ops[i]; in nfsd4_decode_compound()
2481 if (xdr_stream_decode_u32(argp->xdr, &op->opnum) < 0) in nfsd4_decode_compound()
2483 if (nfsd4_opnum_in_range(argp, op)) { in nfsd4_decode_compound()
2485 op->status = nfsd4_dec_ops[op->opnum](argp, &op->u); in nfsd4_decode_compound()
2487 trace_nfsd_compound_decode_err(argp->rqstp, in nfsd4_decode_compound()
2488 argp->opcnt, i, in nfsd4_decode_compound()
2504 readbytes += nfsd4_max_reply(argp->rqstp, op); in nfsd4_decode_compound()
2506 max_reply += nfsd4_max_reply(argp->rqstp, op); in nfsd4_decode_compound()
2517 argp->opcnt = i+1; in nfsd4_decode_compound()
2522 if (argp->minorversion) in nfsd4_decode_compound()
2524 svc_reserve(argp->rqstp, max_reply + readbytes); in nfsd4_decode_compound()
2525 argp->rqstp->rq_cachetype = cachethis ? RC_REPLBUFF : RC_NOCACHE; in nfsd4_decode_compound()
2528 clear_bit(RQ_SPLICE_OK, &argp->rqstp->rq_flags); in nfsd4_decode_compound()