Lines Matching refs:p
143 char *p = svcxdr_tmpalloc(argp, len + 1); in svcxdr_dupstr() local
145 if (!p) in svcxdr_dupstr()
147 memcpy(p, buf, len); in svcxdr_dupstr()
148 p[len] = '\0'; in svcxdr_dupstr()
149 return p; 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()
162 return p; in svcxdr_savemem()
167 memcpy(tmp, p, len); in svcxdr_savemem()
197 __be32 *p; in nfsd4_decode_opaque() local
204 p = xdr_inline_decode(argp->xdr, len); in nfsd4_decode_opaque()
205 if (!p) in nfsd4_decode_opaque()
207 o->data = svcxdr_savemem(argp, p, len); in nfsd4_decode_opaque()
218 __be32 *p, status; in nfsd4_decode_component4() local
222 p = xdr_inline_decode(argp->xdr, *lenp); in nfsd4_decode_component4()
223 if (!p) in nfsd4_decode_component4()
225 status = check_filename((char *)p, *lenp); in nfsd4_decode_component4()
228 *namp = svcxdr_savemem(argp, p, *lenp); in nfsd4_decode_component4()
238 __be32 *p; in nfsd4_decode_nfstime4() local
240 p = xdr_inline_decode(argp->xdr, XDR_UNIT * 3); in nfsd4_decode_nfstime4()
241 if (!p) in nfsd4_decode_nfstime4()
243 p = xdr_decode_hyper(p, &tv->tv_sec); in nfsd4_decode_nfstime4()
244 tv->tv_nsec = be32_to_cpup(p++); in nfsd4_decode_nfstime4()
253 __be32 *p; in nfsd4_decode_verifier4() local
255 p = xdr_inline_decode(argp->xdr, NFS4_VERIFIER_SIZE); in nfsd4_decode_verifier4()
256 if (!p) in nfsd4_decode_verifier4()
258 memcpy(verf->data, p, sizeof(verf->data)); in nfsd4_decode_verifier4()
291 __be32 *p, status; in nfsd4_decode_nfsace4() local
303 p = xdr_inline_decode(argp->xdr, length); in nfsd4_decode_nfsace4()
304 if (!p) in nfsd4_decode_nfsace4()
306 ace->whotype = nfs4_acl_get_whotype((char *)p, length); in nfsd4_decode_nfsace4()
311 (char *)p, length, &ace->who_gid); in nfsd4_decode_nfsace4()
314 (char *)p, length, &ace->who_uid); in nfsd4_decode_nfsace4()
357 __be32 *p; in nfsd4_decode_security_label() local
368 p = xdr_inline_decode(argp->xdr, length); in nfsd4_decode_security_label()
369 if (!p) in nfsd4_decode_security_label()
372 label->data = svcxdr_dupstr(argp, p, length); in nfsd4_decode_security_label()
386 __be32 *p, status; in nfsd4_decode_fattr4() local
433 p = xdr_inline_decode(argp->xdr, length); in nfsd4_decode_fattr4()
434 if (!p) in nfsd4_decode_fattr4()
436 status = nfsd_map_name_to_uid(argp->rqstp, (char *)p, length, in nfsd4_decode_fattr4()
447 p = xdr_inline_decode(argp->xdr, length); in nfsd4_decode_fattr4()
448 if (!p) in nfsd4_decode_fattr4()
450 status = nfsd_map_name_to_gid(argp->rqstp, (char *)p, length, in nfsd4_decode_fattr4()
534 __be32 *p; in nfsd4_decode_stateid4() local
536 p = xdr_inline_decode(argp->xdr, NFS4_STATEID_SIZE); in nfsd4_decode_stateid4()
537 if (!p) in nfsd4_decode_stateid4()
539 sid->si_generation = be32_to_cpup(p++); in nfsd4_decode_stateid4()
540 memcpy(&sid->si_opaque, p, sizeof(sid->si_opaque)); in nfsd4_decode_stateid4()
547 __be32 *p; in nfsd4_decode_clientid4() local
549 p = xdr_inline_decode(argp->xdr, sizeof(__be64)); in nfsd4_decode_clientid4()
550 if (!p) in nfsd4_decode_clientid4()
552 memcpy(clientid, p, sizeof(*clientid)); in nfsd4_decode_clientid4()
573 __be32 *p; in nfsd4_decode_deviceid4() local
575 p = xdr_inline_decode(argp->xdr, NFS4_DEVICEID4_SIZE); in nfsd4_decode_deviceid4()
576 if (!p) in nfsd4_decode_deviceid4()
578 memcpy(devid, p, sizeof(*devid)); in nfsd4_decode_deviceid4()
647 __be32 *p; in nfsd4_decode_sessionid4() local
649 p = xdr_inline_decode(argp->xdr, NFS4_MAX_SESSIONID_LEN); in nfsd4_decode_sessionid4()
650 if (!p) in nfsd4_decode_sessionid4()
652 memcpy(sessionid->data, p, sizeof(sessionid->data)); in nfsd4_decode_sessionid4()
662 __be32 *p, status; in nfsd4_decode_authsys_parms() local
678 p = xdr_inline_decode(argp->xdr, gidcount << 2); in nfsd4_decode_authsys_parms()
679 if (!p) in nfsd4_decode_authsys_parms()
807 __be32 *p, status; in nfsd4_decode_create() local
816 p = xdr_inline_decode(argp->xdr, create->cr_datalen); in nfsd4_decode_create()
817 if (!p) in nfsd4_decode_create()
819 create->cr_data = svcxdr_dupstr(argp, p, create->cr_datalen); in nfsd4_decode_create()
1231 __be32 *p; in nfsd4_decode_putfh() local
1237 p = xdr_inline_decode(argp->xdr, putfh->pf_fhlen); in nfsd4_decode_putfh()
1238 if (!p) in nfsd4_decode_putfh()
1240 putfh->pf_fhval = svcxdr_savemem(argp, p, putfh->pf_fhlen); in nfsd4_decode_putfh()
1346 __be32 *p, status; in nfsd4_decode_setclientid() local
1363 p = xdr_inline_decode(argp->xdr, setclientid->se_callback_netid_len); in nfsd4_decode_setclientid()
1364 if (!p) in nfsd4_decode_setclientid()
1366 setclientid->se_callback_netid_val = svcxdr_savemem(argp, p, in nfsd4_decode_setclientid()
1373 p = xdr_inline_decode(argp->xdr, setclientid->se_callback_addr_len); in nfsd4_decode_setclientid()
1374 if (!p) in nfsd4_decode_setclientid()
1376 setclientid->se_callback_addr_val = svcxdr_savemem(argp, p, in nfsd4_decode_setclientid()
1407 __be32 *p, status; in nfsd4_decode_verify() local
1421 p = xdr_inline_decode(argp->xdr, verify->ve_attrlen); in nfsd4_decode_verify()
1422 if (!p) in nfsd4_decode_verify()
1424 verify->ve_attrval = svcxdr_savemem(argp, p, verify->ve_attrlen); in nfsd4_decode_verify()
1657 __be32 *p; in nfsd4_decode_channel_attrs4() local
1659 p = xdr_inline_decode(argp->xdr, XDR_UNIT * 7); in nfsd4_decode_channel_attrs4()
1660 if (!p) in nfsd4_decode_channel_attrs4()
1664 p++; in nfsd4_decode_channel_attrs4()
1665 ca->maxreq_sz = be32_to_cpup(p++); in nfsd4_decode_channel_attrs4()
1666 ca->maxresp_sz = be32_to_cpup(p++); in nfsd4_decode_channel_attrs4()
1667 ca->maxresp_cached = be32_to_cpup(p++); in nfsd4_decode_channel_attrs4()
1668 ca->maxops = be32_to_cpup(p++); in nfsd4_decode_channel_attrs4()
1669 ca->maxreqs = be32_to_cpup(p++); in nfsd4_decode_channel_attrs4()
1670 ca->nr_rdma_attrs = be32_to_cpup(p); in nfsd4_decode_channel_attrs4()
1755 __be32 *p, status; in nfsd4_decode_layoutcommit() local
1774 p = xdr_inline_decode(argp->xdr, XDR_UNIT); in nfsd4_decode_layoutcommit()
1775 if (!p) in nfsd4_decode_layoutcommit()
1777 if (xdr_item_is_present(p)) { in nfsd4_decode_layoutcommit()
1848 __be32 *p, status; in nfsd4_decode_sequence() local
1853 p = xdr_inline_decode(argp->xdr, XDR_UNIT * 4); in nfsd4_decode_sequence()
1854 if (!p) in nfsd4_decode_sequence()
1856 seq->seqid = be32_to_cpup(p++); in nfsd4_decode_sequence()
1857 seq->slotid = be32_to_cpup(p++); in nfsd4_decode_sequence()
1858 seq->maxslots = be32_to_cpup(p++); in nfsd4_decode_sequence()
1859 seq->cachethis = be32_to_cpup(p); in nfsd4_decode_sequence()
1931 __be32 *p; in nfsd4_decode_nl4_server() local
1946 p = xdr_inline_decode(argp->xdr, naddr->netid_len); in nfsd4_decode_nl4_server()
1947 if (!p) in nfsd4_decode_nl4_server()
1949 memcpy(naddr->netid, p, naddr->netid_len); in nfsd4_decode_nl4_server()
1956 p = xdr_inline_decode(argp->xdr, naddr->addr_len); in nfsd4_decode_nl4_server()
1957 if (!p) in nfsd4_decode_nl4_server()
1959 memcpy(naddr->addr, p, naddr->addr_len); in nfsd4_decode_nl4_server()
2160 __be32 *p; in nfsd4_decode_xattr_name() local
2168 p = xdr_inline_decode(argp->xdr, namelen); in nfsd4_decode_xattr_name()
2169 if (!p) in nfsd4_decode_xattr_name()
2180 sp = (char *)p; in nfsd4_decode_xattr_name()
2306 nfsd4_decode_noop(struct nfsd4_compoundargs *argp, union nfsd4_op_u *p) in nfsd4_decode_noop() argument
2312 nfsd4_decode_notsupp(struct nfsd4_compoundargs *argp, union nfsd4_op_u *p) in nfsd4_decode_notsupp() argument
2431 __be32 *p; in nfsd4_decode_compound() local
2441 p = xdr_inline_decode(argp->xdr, argp->taglen); in nfsd4_decode_compound()
2442 if (!p) in nfsd4_decode_compound()
2444 argp->tag = svcxdr_savemem(argp, p, argp->taglen); in nfsd4_decode_compound()
2525 static __be32 *encode_change(__be32 *p, struct kstat *stat, struct inode *inode, in encode_change() argument
2529 *p++ = cpu_to_be32(convert_to_wallclock(exp->cd->flush_time)); in encode_change()
2530 *p++ = 0; in encode_change()
2532 p = xdr_encode_hyper(p, nfsd4_change_attribute(stat, inode)); in encode_change()
2533 return p; in encode_change()
2539 __be32 *p; in nfsd4_encode_nfstime4() local
2541 p = xdr_reserve_space(xdr, XDR_UNIT * 3); in nfsd4_encode_nfstime4()
2542 if (!p) in nfsd4_encode_nfstime4()
2545 p = xdr_encode_hyper(p, (s64)tv->tv_sec); in nfsd4_encode_nfstime4()
2546 *p = cpu_to_be32(tv->tv_nsec); in nfsd4_encode_nfstime4()
2561 static __be32 *encode_time_delta(__be32 *p, struct inode *inode) in encode_time_delta() argument
2569 p = xdr_encode_hyper(p, ts.tv_sec); in encode_time_delta()
2570 *p++ = cpu_to_be32(ts.tv_nsec); in encode_time_delta()
2572 return p; in encode_time_delta()
2594 __be32 *p; in nfsd4_encode_components_esc() local
2603 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_components_esc()
2604 if (!p) in nfsd4_encode_components_esc()
2606 p++; /* We will fill this in with @count later */ in nfsd4_encode_components_esc()
2629 p = xdr_reserve_space(xdr, strlen + 4); in nfsd4_encode_components_esc()
2630 if (!p) in nfsd4_encode_components_esc()
2632 p = xdr_encode_opaque(p, str, strlen); in nfsd4_encode_components_esc()
2682 __be32 *p; in nfsd4_encode_path() local
2714 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_path()
2715 if (!p) in nfsd4_encode_path()
2717 *p++ = cpu_to_be32(ncomponents); in nfsd4_encode_path()
2725 p = xdr_reserve_space(xdr, len + 4); in nfsd4_encode_path()
2726 if (!p) { in nfsd4_encode_path()
2730 p = xdr_encode_opaque(p, dentry->d_name.name, len); in nfsd4_encode_path()
2769 __be32 *p; in nfsd4_encode_fs_locations() local
2775 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_fs_locations()
2776 if (!p) in nfsd4_encode_fs_locations()
2778 *p++ = cpu_to_be32(fslocs->locations_count); in nfsd4_encode_fs_locations()
2816 __be32 *p; in nfsd4_encode_layout_types() local
2819 p = xdr_reserve_space(xdr, 4 + 4 * i); in nfsd4_encode_layout_types()
2820 if (!p) in nfsd4_encode_layout_types()
2823 *p++ = cpu_to_be32(i); in nfsd4_encode_layout_types()
2827 *p++ = cpu_to_be32(i); in nfsd4_encode_layout_types()
2842 __be32 *p; in nfsd4_encode_security_label() local
2844 p = xdr_reserve_space(xdr, len + 4 + 4 + 4); in nfsd4_encode_security_label()
2845 if (!p) in nfsd4_encode_security_label()
2852 *p++ = cpu_to_be32(0); /* lfs */ in nfsd4_encode_security_label()
2853 *p++ = cpu_to_be32(0); /* pi */ in nfsd4_encode_security_label()
2854 p = xdr_encode_opaque(p, context, len); in nfsd4_encode_security_label()
2903 __be32 *p; in nfsd4_encode_bitmap() local
2906 p = xdr_reserve_space(xdr, 16); in nfsd4_encode_bitmap()
2907 if (!p) in nfsd4_encode_bitmap()
2909 *p++ = cpu_to_be32(3); in nfsd4_encode_bitmap()
2910 *p++ = cpu_to_be32(bmval0); in nfsd4_encode_bitmap()
2911 *p++ = cpu_to_be32(bmval1); in nfsd4_encode_bitmap()
2912 *p++ = cpu_to_be32(bmval2); in nfsd4_encode_bitmap()
2914 p = xdr_reserve_space(xdr, 12); in nfsd4_encode_bitmap()
2915 if (!p) in nfsd4_encode_bitmap()
2917 *p++ = cpu_to_be32(2); in nfsd4_encode_bitmap()
2918 *p++ = cpu_to_be32(bmval0); in nfsd4_encode_bitmap()
2919 *p++ = cpu_to_be32(bmval1); in nfsd4_encode_bitmap()
2921 p = xdr_reserve_space(xdr, 8); in nfsd4_encode_bitmap()
2922 if (!p) in nfsd4_encode_bitmap()
2924 *p++ = cpu_to_be32(1); in nfsd4_encode_bitmap()
2925 *p++ = cpu_to_be32(bmval0); in nfsd4_encode_bitmap()
2949 __be32 *p, *attrlen_p; in nfsd4_encode_fattr() local
3060 p = xdr_reserve_space(xdr, 12); in nfsd4_encode_fattr()
3061 if (!p) in nfsd4_encode_fattr()
3063 *p++ = cpu_to_be32(2); in nfsd4_encode_fattr()
3064 *p++ = cpu_to_be32(supp[0]); in nfsd4_encode_fattr()
3065 *p++ = cpu_to_be32(supp[1]); in nfsd4_encode_fattr()
3067 p = xdr_reserve_space(xdr, 16); in nfsd4_encode_fattr()
3068 if (!p) in nfsd4_encode_fattr()
3070 *p++ = cpu_to_be32(3); in nfsd4_encode_fattr()
3071 *p++ = cpu_to_be32(supp[0]); in nfsd4_encode_fattr()
3072 *p++ = cpu_to_be32(supp[1]); in nfsd4_encode_fattr()
3073 *p++ = cpu_to_be32(supp[2]); in nfsd4_encode_fattr()
3077 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_fattr()
3078 if (!p) in nfsd4_encode_fattr()
3085 *p++ = cpu_to_be32(dummy); in nfsd4_encode_fattr()
3088 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_fattr()
3089 if (!p) in nfsd4_encode_fattr()
3092 *p++ = cpu_to_be32(NFS4_FH_PERSISTENT); in nfsd4_encode_fattr()
3094 *p++ = cpu_to_be32(NFS4_FH_PERSISTENT| in nfsd4_encode_fattr()
3098 p = xdr_reserve_space(xdr, 8); in nfsd4_encode_fattr()
3099 if (!p) in nfsd4_encode_fattr()
3101 p = encode_change(p, &stat, d_inode(dentry), exp); in nfsd4_encode_fattr()
3104 p = xdr_reserve_space(xdr, 8); in nfsd4_encode_fattr()
3105 if (!p) in nfsd4_encode_fattr()
3107 p = xdr_encode_hyper(p, stat.size); in nfsd4_encode_fattr()
3110 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_fattr()
3111 if (!p) in nfsd4_encode_fattr()
3113 *p++ = cpu_to_be32(1); in nfsd4_encode_fattr()
3116 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_fattr()
3117 if (!p) in nfsd4_encode_fattr()
3119 *p++ = cpu_to_be32(1); in nfsd4_encode_fattr()
3122 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_fattr()
3123 if (!p) in nfsd4_encode_fattr()
3125 *p++ = cpu_to_be32(0); in nfsd4_encode_fattr()
3128 p = xdr_reserve_space(xdr, 16); in nfsd4_encode_fattr()
3129 if (!p) in nfsd4_encode_fattr()
3132 p = xdr_encode_hyper(p, NFS4_REFERRAL_FSID_MAJOR); in nfsd4_encode_fattr()
3133 p = xdr_encode_hyper(p, NFS4_REFERRAL_FSID_MINOR); in nfsd4_encode_fattr()
3136 p = xdr_encode_hyper(p, (u64)exp->ex_fsid); in nfsd4_encode_fattr()
3137 p = xdr_encode_hyper(p, (u64)0); in nfsd4_encode_fattr()
3140 *p++ = cpu_to_be32(0); in nfsd4_encode_fattr()
3141 *p++ = cpu_to_be32(MAJOR(stat.dev)); in nfsd4_encode_fattr()
3142 *p++ = cpu_to_be32(0); in nfsd4_encode_fattr()
3143 *p++ = cpu_to_be32(MINOR(stat.dev)); in nfsd4_encode_fattr()
3146 p = xdr_encode_opaque_fixed(p, exp->ex_uuid, in nfsd4_encode_fattr()
3152 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_fattr()
3153 if (!p) in nfsd4_encode_fattr()
3155 *p++ = cpu_to_be32(0); in nfsd4_encode_fattr()
3158 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_fattr()
3159 if (!p) in nfsd4_encode_fattr()
3161 *p++ = cpu_to_be32(nn->nfsd4_lease); in nfsd4_encode_fattr()
3164 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_fattr()
3165 if (!p) in nfsd4_encode_fattr()
3167 *p++ = cpu_to_be32(rdattr_err); in nfsd4_encode_fattr()
3173 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_fattr()
3174 if (!p) in nfsd4_encode_fattr()
3177 *p++ = cpu_to_be32(0); in nfsd4_encode_fattr()
3180 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_fattr()
3181 if (!p) in nfsd4_encode_fattr()
3183 *p++ = cpu_to_be32(acl->naces); in nfsd4_encode_fattr()
3186 p = xdr_reserve_space(xdr, 4*3); in nfsd4_encode_fattr()
3187 if (!p) in nfsd4_encode_fattr()
3189 *p++ = cpu_to_be32(ace->type); in nfsd4_encode_fattr()
3190 *p++ = cpu_to_be32(ace->flag); in nfsd4_encode_fattr()
3191 *p++ = cpu_to_be32(ace->access_mask & in nfsd4_encode_fattr()
3200 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_fattr()
3201 if (!p) in nfsd4_encode_fattr()
3203 *p++ = cpu_to_be32(IS_POSIXACL(dentry->d_inode) ? in nfsd4_encode_fattr()
3207 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_fattr()
3208 if (!p) in nfsd4_encode_fattr()
3210 *p++ = cpu_to_be32(1); in nfsd4_encode_fattr()
3213 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_fattr()
3214 if (!p) in nfsd4_encode_fattr()
3216 *p++ = cpu_to_be32(0); in nfsd4_encode_fattr()
3219 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_fattr()
3220 if (!p) in nfsd4_encode_fattr()
3222 *p++ = cpu_to_be32(1); in nfsd4_encode_fattr()
3225 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_fattr()
3226 if (!p) in nfsd4_encode_fattr()
3228 *p++ = cpu_to_be32(1); in nfsd4_encode_fattr()
3231 p = xdr_reserve_space(xdr, fhp->fh_handle.fh_size + 4); in nfsd4_encode_fattr()
3232 if (!p) in nfsd4_encode_fattr()
3234 p = xdr_encode_opaque(p, &fhp->fh_handle.fh_raw, in nfsd4_encode_fattr()
3238 p = xdr_reserve_space(xdr, 8); in nfsd4_encode_fattr()
3239 if (!p) in nfsd4_encode_fattr()
3241 p = xdr_encode_hyper(p, stat.ino); in nfsd4_encode_fattr()
3244 p = xdr_reserve_space(xdr, 8); in nfsd4_encode_fattr()
3245 if (!p) in nfsd4_encode_fattr()
3247 p = xdr_encode_hyper(p, (u64) statfs.f_ffree); in nfsd4_encode_fattr()
3250 p = xdr_reserve_space(xdr, 8); in nfsd4_encode_fattr()
3251 if (!p) in nfsd4_encode_fattr()
3253 p = xdr_encode_hyper(p, (u64) statfs.f_ffree); in nfsd4_encode_fattr()
3256 p = xdr_reserve_space(xdr, 8); in nfsd4_encode_fattr()
3257 if (!p) in nfsd4_encode_fattr()
3259 p = xdr_encode_hyper(p, (u64) statfs.f_files); in nfsd4_encode_fattr()
3267 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_fattr()
3268 if (!p) in nfsd4_encode_fattr()
3270 *p++ = cpu_to_be32(1); in nfsd4_encode_fattr()
3273 p = xdr_reserve_space(xdr, 8); in nfsd4_encode_fattr()
3274 if (!p) in nfsd4_encode_fattr()
3276 p = xdr_encode_hyper(p, exp->ex_path.mnt->mnt_sb->s_maxbytes); in nfsd4_encode_fattr()
3279 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_fattr()
3280 if (!p) in nfsd4_encode_fattr()
3282 *p++ = cpu_to_be32(255); in nfsd4_encode_fattr()
3285 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_fattr()
3286 if (!p) in nfsd4_encode_fattr()
3288 *p++ = cpu_to_be32(statfs.f_namelen); in nfsd4_encode_fattr()
3291 p = xdr_reserve_space(xdr, 8); in nfsd4_encode_fattr()
3292 if (!p) in nfsd4_encode_fattr()
3294 p = xdr_encode_hyper(p, (u64) svc_max_payload(rqstp)); in nfsd4_encode_fattr()
3297 p = xdr_reserve_space(xdr, 8); in nfsd4_encode_fattr()
3298 if (!p) in nfsd4_encode_fattr()
3300 p = xdr_encode_hyper(p, (u64) svc_max_payload(rqstp)); in nfsd4_encode_fattr()
3303 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_fattr()
3304 if (!p) in nfsd4_encode_fattr()
3306 *p++ = cpu_to_be32(stat.mode & S_IALLUGO); in nfsd4_encode_fattr()
3309 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_fattr()
3310 if (!p) in nfsd4_encode_fattr()
3312 *p++ = cpu_to_be32(1); in nfsd4_encode_fattr()
3315 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_fattr()
3316 if (!p) in nfsd4_encode_fattr()
3318 *p++ = cpu_to_be32(stat.nlink); in nfsd4_encode_fattr()
3331 p = xdr_reserve_space(xdr, 8); in nfsd4_encode_fattr()
3332 if (!p) in nfsd4_encode_fattr()
3334 *p++ = cpu_to_be32((u32) MAJOR(stat.rdev)); in nfsd4_encode_fattr()
3335 *p++ = cpu_to_be32((u32) MINOR(stat.rdev)); in nfsd4_encode_fattr()
3338 p = xdr_reserve_space(xdr, 8); in nfsd4_encode_fattr()
3339 if (!p) in nfsd4_encode_fattr()
3342 p = xdr_encode_hyper(p, dummy64); in nfsd4_encode_fattr()
3345 p = xdr_reserve_space(xdr, 8); in nfsd4_encode_fattr()
3346 if (!p) in nfsd4_encode_fattr()
3349 p = xdr_encode_hyper(p, dummy64); in nfsd4_encode_fattr()
3352 p = xdr_reserve_space(xdr, 8); in nfsd4_encode_fattr()
3353 if (!p) in nfsd4_encode_fattr()
3356 p = xdr_encode_hyper(p, dummy64); in nfsd4_encode_fattr()
3359 p = xdr_reserve_space(xdr, 8); in nfsd4_encode_fattr()
3360 if (!p) in nfsd4_encode_fattr()
3363 p = xdr_encode_hyper(p, dummy64); in nfsd4_encode_fattr()
3376 p = xdr_reserve_space(xdr, 12); in nfsd4_encode_fattr()
3377 if (!p) in nfsd4_encode_fattr()
3379 p = encode_time_delta(p, d_inode(dentry)); in nfsd4_encode_fattr()
3394 p = xdr_reserve_space(xdr, 8); in nfsd4_encode_fattr()
3395 if (!p) in nfsd4_encode_fattr()
3408 p = xdr_encode_hyper(p, ino); in nfsd4_encode_fattr()
3424 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_fattr()
3425 if (!p) in nfsd4_encode_fattr()
3427 *p++ = cpu_to_be32(stat.blksize); in nfsd4_encode_fattr()
3453 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_fattr()
3454 if (!p) in nfsd4_encode_fattr()
3457 *p++ = cpu_to_be32(err == 0); in nfsd4_encode_fattr()
3485 struct xdr_buf *buf, __be32 *p, int bytes) in svcxdr_init_encode_from_buffer() argument
3489 buf->head[0].iov_base = p; in svcxdr_init_encode_from_buffer()
3494 xdr->p = p; in svcxdr_init_encode_from_buffer()
3495 xdr->end = (void *)p + bytes; in svcxdr_init_encode_from_buffer()
3499 __be32 nfsd4_encode_fattr_to_buf(__be32 **p, int words, in nfsd4_encode_fattr_to_buf() argument
3508 svcxdr_init_encode_from_buffer(&xdr, &dummy, *p, words << 2); in nfsd4_encode_fattr_to_buf()
3511 *p = xdr.p; in nfsd4_encode_fattr_to_buf()
3580 __be32 *p; in nfsd4_encode_rdattr_error() local
3582 p = xdr_reserve_space(xdr, 20); in nfsd4_encode_rdattr_error()
3583 if (!p) in nfsd4_encode_rdattr_error()
3585 *p++ = htonl(2); in nfsd4_encode_rdattr_error()
3586 *p++ = htonl(FATTR4_WORD0_RDATTR_ERROR); /* bmval0 */ in nfsd4_encode_rdattr_error()
3587 *p++ = htonl(0); /* bmval1 */ in nfsd4_encode_rdattr_error()
3589 *p++ = htonl(4); /* attribute length */ in nfsd4_encode_rdattr_error()
3590 *p++ = nfserr; /* no htonl */ in nfsd4_encode_rdattr_error()
3591 return p; in nfsd4_encode_rdattr_error()
3607 __be32 *p; in nfsd4_encode_dirent() local
3621 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_dirent()
3622 if (!p) in nfsd4_encode_dirent()
3624 *p++ = xdr_one; /* mark entry present */ in nfsd4_encode_dirent()
3626 p = xdr_reserve_space(xdr, 3*4 + namlen); in nfsd4_encode_dirent()
3627 if (!p) in nfsd4_encode_dirent()
3629 p = xdr_encode_hyper(p, OFFSET_MAX); /* offset of next entry */ in nfsd4_encode_dirent()
3630 p = xdr_encode_array(p, name, namlen); /* name length & name */ in nfsd4_encode_dirent()
3663 p = nfsd4_encode_rdattr_error(xdr, nfserr); in nfsd4_encode_dirent()
3664 if (p == NULL) { in nfsd4_encode_dirent()
3701 __be32 *p; in nfsd4_encode_verifier4() local
3703 p = xdr_reserve_space(xdr, NFS4_VERIFIER_SIZE); in nfsd4_encode_verifier4()
3704 if (!p) in nfsd4_encode_verifier4()
3706 memcpy(p, verf->data, sizeof(verf->data)); in nfsd4_encode_verifier4()
3713 __be32 *p; in nfsd4_encode_clientid4() local
3715 p = xdr_reserve_space(xdr, sizeof(__be64)); in nfsd4_encode_clientid4()
3716 if (!p) in nfsd4_encode_clientid4()
3718 memcpy(p, clientid, sizeof(*clientid)); in nfsd4_encode_clientid4()
3725 __be32 *p; in nfsd4_encode_stateid() local
3727 p = xdr_reserve_space(xdr, sizeof(stateid_t)); in nfsd4_encode_stateid()
3728 if (!p) in nfsd4_encode_stateid()
3730 *p++ = cpu_to_be32(sid->si_generation); in nfsd4_encode_stateid()
3731 p = xdr_encode_opaque_fixed(p, &sid->si_opaque, in nfsd4_encode_stateid()
3742 __be32 *p; in nfsd4_encode_access() local
3744 p = xdr_reserve_space(xdr, 8); in nfsd4_encode_access()
3745 if (!p) in nfsd4_encode_access()
3747 *p++ = cpu_to_be32(access->ac_supported); in nfsd4_encode_access()
3748 *p++ = cpu_to_be32(access->ac_resp_access); in nfsd4_encode_access()
3757 __be32 *p; in nfsd4_encode_bind_conn_to_session() local
3759 p = xdr_reserve_space(xdr, NFS4_MAX_SESSIONID_LEN + 8); in nfsd4_encode_bind_conn_to_session()
3760 if (!p) in nfsd4_encode_bind_conn_to_session()
3762 p = xdr_encode_opaque_fixed(p, bcts->sessionid.data, in nfsd4_encode_bind_conn_to_session()
3764 *p++ = cpu_to_be32(bcts->dir); in nfsd4_encode_bind_conn_to_session()
3766 *p++ = cpu_to_be32(0); in nfsd4_encode_bind_conn_to_session()
3824 __be32 *p; in nfsd4_encode_getfh() local
3827 p = xdr_reserve_space(xdr, len + 4); in nfsd4_encode_getfh()
3828 if (!p) in nfsd4_encode_getfh()
3830 p = xdr_encode_opaque(p, &fhp->fh_handle.fh_raw, len); in nfsd4_encode_getfh()
3842 __be32 *p; in nfsd4_encode_lock_denied() local
3845 p = xdr_reserve_space(xdr, 32 + XDR_LEN(conf->len)); in nfsd4_encode_lock_denied()
3846 if (!p) { in nfsd4_encode_lock_denied()
3859 p = xdr_encode_hyper(p, ld->ld_start); in nfsd4_encode_lock_denied()
3860 p = xdr_encode_hyper(p, ld->ld_length); in nfsd4_encode_lock_denied()
3861 *p++ = cpu_to_be32(ld->ld_type); in nfsd4_encode_lock_denied()
3863 p = xdr_encode_opaque_fixed(p, &ld->ld_clientid, 8); in nfsd4_encode_lock_denied()
3864 p = xdr_encode_opaque(p, conf->data, conf->len); in nfsd4_encode_lock_denied()
3867 p = xdr_encode_hyper(p, (u64)0); /* clientid */ in nfsd4_encode_lock_denied()
3868 *p++ = cpu_to_be32(0); /* length of owner name */ in nfsd4_encode_lock_denied()
3928 __be32 *p; in nfsd4_encode_open() local
3944 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_open()
3945 if (!p) in nfsd4_encode_open()
3948 *p++ = cpu_to_be32(open->op_delegate_type); in nfsd4_encode_open()
3956 p = xdr_reserve_space(xdr, 20); in nfsd4_encode_open()
3957 if (!p) in nfsd4_encode_open()
3959 *p++ = cpu_to_be32(open->op_recall); in nfsd4_encode_open()
3964 *p++ = cpu_to_be32(NFS4_ACE_ACCESS_ALLOWED_ACE_TYPE); in nfsd4_encode_open()
3965 *p++ = cpu_to_be32(0); in nfsd4_encode_open()
3966 *p++ = cpu_to_be32(0); in nfsd4_encode_open()
3967 *p++ = cpu_to_be32(0); /* XXX: is NULL principal ok? */ in nfsd4_encode_open()
3974 p = xdr_reserve_space(xdr, XDR_UNIT * 8); in nfsd4_encode_open()
3975 if (!p) in nfsd4_encode_open()
3977 *p++ = cpu_to_be32(open->op_recall); in nfsd4_encode_open()
3984 *p++ = cpu_to_be32(NFS4_LIMIT_SIZE); in nfsd4_encode_open()
3985 *p++ = xdr_zero; in nfsd4_encode_open()
3986 *p++ = xdr_zero; in nfsd4_encode_open()
3991 *p++ = cpu_to_be32(NFS4_ACE_ACCESS_ALLOWED_ACE_TYPE); in nfsd4_encode_open()
3992 *p++ = cpu_to_be32(0); in nfsd4_encode_open()
3993 *p++ = cpu_to_be32(0); in nfsd4_encode_open()
3994 *p++ = cpu_to_be32(0); /* XXX: is NULL principal ok? */ in nfsd4_encode_open()
4000 p = xdr_reserve_space(xdr, 8); in nfsd4_encode_open()
4001 if (!p) in nfsd4_encode_open()
4003 *p++ = cpu_to_be32(open->op_why_no_deleg); in nfsd4_encode_open()
4005 *p++ = cpu_to_be32(0); in nfsd4_encode_open()
4008 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_open()
4009 if (!p) in nfsd4_encode_open()
4011 *p++ = cpu_to_be32(open->op_why_no_deleg); in nfsd4_encode_open()
4061 if (xdr->iov != xdr->buf->head || xdr->end - xdr->p < 1) in nfsd4_encode_splice_read()
4086 space_left = min_t(int, (void *)xdr->end - (void *)xdr->p, in nfsd4_encode_splice_read()
4141 __be32 *p; in nfsd4_encode_read() local
4147 p = xdr_reserve_space(xdr, 8); /* eof flag and byte count */ in nfsd4_encode_read()
4148 if (!p) { in nfsd4_encode_read()
4170 p = xdr_encode_bool(p, read->rd_eof); in nfsd4_encode_read()
4171 *p = cpu_to_be32(read->rd_length); in nfsd4_encode_read()
4180 __be32 *p, *maxcount_p, zero = xdr_zero; in nfsd4_encode_readlink() local
4190 p = xdr_reserve_space(xdr, maxcount); in nfsd4_encode_readlink()
4191 if (!p) in nfsd4_encode_readlink()
4200 (char *)p, &maxcount); in nfsd4_encode_readlink()
4233 __be32 *p; in nfsd4_encode_readdir() local
4295 p = xdr_reserve_space(xdr, 8); in nfsd4_encode_readdir()
4296 if (!p) { in nfsd4_encode_readdir()
4300 *p++ = 0; /* no more entries */ in nfsd4_encode_readdir()
4301 *p++ = htonl(readdir->common.err == nfserr_eof); in nfsd4_encode_readdir()
4338 __be32 *p, *flavorsp; in nfsd4_do_encode_secinfo() local
4362 p = xdr_reserve_space(xdr, 4); in nfsd4_do_encode_secinfo()
4363 if (!p) in nfsd4_do_encode_secinfo()
4365 flavorsp = p++; /* to be backfilled later */ in nfsd4_do_encode_secinfo()
4373 p = xdr_reserve_space(xdr, 4 + 4 + in nfsd4_do_encode_secinfo()
4375 if (!p) in nfsd4_do_encode_secinfo()
4377 *p++ = cpu_to_be32(RPC_AUTH_GSS); in nfsd4_do_encode_secinfo()
4378 p = xdr_encode_opaque(p, info.oid.data, info.oid.len); in nfsd4_do_encode_secinfo()
4379 *p++ = cpu_to_be32(info.qop); in nfsd4_do_encode_secinfo()
4380 *p++ = cpu_to_be32(info.service); in nfsd4_do_encode_secinfo()
4383 p = xdr_reserve_space(xdr, 4); in nfsd4_do_encode_secinfo()
4384 if (!p) in nfsd4_do_encode_secinfo()
4386 *p++ = cpu_to_be32(pf); in nfsd4_do_encode_secinfo()
4430 __be32 *p; in nfsd4_encode_setattr() local
4432 p = xdr_reserve_space(xdr, 16); in nfsd4_encode_setattr()
4433 if (!p) in nfsd4_encode_setattr()
4436 *p++ = cpu_to_be32(3); in nfsd4_encode_setattr()
4437 *p++ = cpu_to_be32(0); in nfsd4_encode_setattr()
4438 *p++ = cpu_to_be32(0); in nfsd4_encode_setattr()
4439 *p++ = cpu_to_be32(0); in nfsd4_encode_setattr()
4442 *p++ = cpu_to_be32(3); in nfsd4_encode_setattr()
4443 *p++ = cpu_to_be32(setattr->sa_bmval[0]); in nfsd4_encode_setattr()
4444 *p++ = cpu_to_be32(setattr->sa_bmval[1]); in nfsd4_encode_setattr()
4445 *p++ = cpu_to_be32(setattr->sa_bmval[2]); in nfsd4_encode_setattr()
4497 __be32 *p; in nfsd4_encode_exchange_id() local
4542 p = xdr_reserve_space(xdr, in nfsd4_encode_exchange_id()
4549 if (!p) in nfsd4_encode_exchange_id()
4553 p = xdr_encode_hyper(p, minor_id); /* Minor id */ in nfsd4_encode_exchange_id()
4555 p = xdr_encode_opaque(p, major_id, major_id_sz); in nfsd4_encode_exchange_id()
4558 p = xdr_encode_opaque(p, server_scope, server_scope_sz); in nfsd4_encode_exchange_id()
4561 *p++ = cpu_to_be32(0); /* zero length nfs_impl_id4 array */ in nfsd4_encode_exchange_id()
4571 __be32 *p; in nfsd4_encode_create_session() local
4573 p = xdr_reserve_space(xdr, 24); in nfsd4_encode_create_session()
4574 if (!p) in nfsd4_encode_create_session()
4576 p = xdr_encode_opaque_fixed(p, sess->sessionid.data, in nfsd4_encode_create_session()
4578 *p++ = cpu_to_be32(sess->seqid); in nfsd4_encode_create_session()
4579 *p++ = cpu_to_be32(sess->flags); in nfsd4_encode_create_session()
4581 p = xdr_reserve_space(xdr, 28); in nfsd4_encode_create_session()
4582 if (!p) in nfsd4_encode_create_session()
4584 *p++ = cpu_to_be32(0); /* headerpadsz */ in nfsd4_encode_create_session()
4585 *p++ = cpu_to_be32(sess->fore_channel.maxreq_sz); in nfsd4_encode_create_session()
4586 *p++ = cpu_to_be32(sess->fore_channel.maxresp_sz); in nfsd4_encode_create_session()
4587 *p++ = cpu_to_be32(sess->fore_channel.maxresp_cached); in nfsd4_encode_create_session()
4588 *p++ = cpu_to_be32(sess->fore_channel.maxops); in nfsd4_encode_create_session()
4589 *p++ = cpu_to_be32(sess->fore_channel.maxreqs); in nfsd4_encode_create_session()
4590 *p++ = cpu_to_be32(sess->fore_channel.nr_rdma_attrs); in nfsd4_encode_create_session()
4593 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_create_session()
4594 if (!p) in nfsd4_encode_create_session()
4596 *p++ = cpu_to_be32(sess->fore_channel.rdma_attrs); in nfsd4_encode_create_session()
4599 p = xdr_reserve_space(xdr, 28); in nfsd4_encode_create_session()
4600 if (!p) in nfsd4_encode_create_session()
4602 *p++ = cpu_to_be32(0); /* headerpadsz */ in nfsd4_encode_create_session()
4603 *p++ = cpu_to_be32(sess->back_channel.maxreq_sz); in nfsd4_encode_create_session()
4604 *p++ = cpu_to_be32(sess->back_channel.maxresp_sz); in nfsd4_encode_create_session()
4605 *p++ = cpu_to_be32(sess->back_channel.maxresp_cached); in nfsd4_encode_create_session()
4606 *p++ = cpu_to_be32(sess->back_channel.maxops); in nfsd4_encode_create_session()
4607 *p++ = cpu_to_be32(sess->back_channel.maxreqs); in nfsd4_encode_create_session()
4608 *p++ = cpu_to_be32(sess->back_channel.nr_rdma_attrs); in nfsd4_encode_create_session()
4611 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_create_session()
4612 if (!p) in nfsd4_encode_create_session()
4614 *p++ = cpu_to_be32(sess->back_channel.rdma_attrs); in nfsd4_encode_create_session()
4625 __be32 *p; in nfsd4_encode_sequence() local
4627 p = xdr_reserve_space(xdr, NFS4_MAX_SESSIONID_LEN + 20); in nfsd4_encode_sequence()
4628 if (!p) in nfsd4_encode_sequence()
4630 p = xdr_encode_opaque_fixed(p, seq->sessionid.data, in nfsd4_encode_sequence()
4632 *p++ = cpu_to_be32(seq->seqid); in nfsd4_encode_sequence()
4633 *p++ = cpu_to_be32(seq->slotid); in nfsd4_encode_sequence()
4635 *p++ = cpu_to_be32(seq->maxslots - 1); /* sr_highest_slotid */ in nfsd4_encode_sequence()
4636 *p++ = cpu_to_be32(seq->maxslots - 1); /* sr_target_highest_slotid */ in nfsd4_encode_sequence()
4637 *p++ = cpu_to_be32(seq->status_flags); in nfsd4_encode_sequence()
4650 __be32 *p; in nfsd4_encode_test_stateid() local
4652 p = xdr_reserve_space(xdr, 4 + (4 * test_stateid->ts_num_ids)); in nfsd4_encode_test_stateid()
4653 if (!p) in nfsd4_encode_test_stateid()
4655 *p++ = htonl(test_stateid->ts_num_ids); in nfsd4_encode_test_stateid()
4658 *p++ = stateid->ts_id_status; in nfsd4_encode_test_stateid()
4673 __be32 *p; in nfsd4_encode_getdeviceinfo() local
4675 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_getdeviceinfo()
4676 if (!p) in nfsd4_encode_getdeviceinfo()
4679 *p++ = cpu_to_be32(gdev->gd_layout_type); in nfsd4_encode_getdeviceinfo()
4695 p = xdr_reserve_space(xdr, 4 + 4); in nfsd4_encode_getdeviceinfo()
4696 if (!p) in nfsd4_encode_getdeviceinfo()
4698 *p++ = cpu_to_be32(1); /* bitmap length */ in nfsd4_encode_getdeviceinfo()
4699 *p++ = cpu_to_be32(gdev->gd_notify_types); in nfsd4_encode_getdeviceinfo()
4701 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_getdeviceinfo()
4702 if (!p) in nfsd4_encode_getdeviceinfo()
4704 *p++ = 0; in nfsd4_encode_getdeviceinfo()
4712 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_getdeviceinfo()
4713 if (!p) in nfsd4_encode_getdeviceinfo()
4715 *p++ = cpu_to_be32(needed_len); in nfsd4_encode_getdeviceinfo()
4726 __be32 *p; in nfsd4_encode_layoutget() local
4728 p = xdr_reserve_space(xdr, 36 + sizeof(stateid_opaque_t)); in nfsd4_encode_layoutget()
4729 if (!p) in nfsd4_encode_layoutget()
4732 *p++ = cpu_to_be32(1); /* we always set return-on-close */ in nfsd4_encode_layoutget()
4733 *p++ = cpu_to_be32(lgp->lg_sid.si_generation); in nfsd4_encode_layoutget()
4734 p = xdr_encode_opaque_fixed(p, &lgp->lg_sid.si_opaque, in nfsd4_encode_layoutget()
4737 *p++ = cpu_to_be32(1); /* we always return a single layout */ in nfsd4_encode_layoutget()
4738 p = xdr_encode_hyper(p, lgp->lg_seg.offset); in nfsd4_encode_layoutget()
4739 p = xdr_encode_hyper(p, lgp->lg_seg.length); in nfsd4_encode_layoutget()
4740 *p++ = cpu_to_be32(lgp->lg_seg.iomode); in nfsd4_encode_layoutget()
4741 *p++ = cpu_to_be32(lgp->lg_layout_type); in nfsd4_encode_layoutget()
4753 __be32 *p; in nfsd4_encode_layoutcommit() local
4755 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_layoutcommit()
4756 if (!p) in nfsd4_encode_layoutcommit()
4758 *p++ = cpu_to_be32(lcp->lc_size_chg); in nfsd4_encode_layoutcommit()
4760 p = xdr_reserve_space(xdr, 8); in nfsd4_encode_layoutcommit()
4761 if (!p) in nfsd4_encode_layoutcommit()
4763 p = xdr_encode_hyper(p, lcp->lc_newsize); in nfsd4_encode_layoutcommit()
4775 __be32 *p; in nfsd4_encode_layoutreturn() local
4777 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_layoutreturn()
4778 if (!p) in nfsd4_encode_layoutreturn()
4780 *p++ = cpu_to_be32(lrp->lrs_present); in nfsd4_encode_layoutreturn()
4791 __be32 *p; in nfsd42_encode_write_res() local
4792 p = xdr_reserve_space(resp->xdr, 4); in nfsd42_encode_write_res()
4793 if (!p) in nfsd42_encode_write_res()
4797 *p++ = cpu_to_be32(0); in nfsd42_encode_write_res()
4800 *p++ = cpu_to_be32(1); in nfsd42_encode_write_res()
4805 p = xdr_reserve_space(resp->xdr, 8 + 4 + NFS4_VERIFIER_SIZE); in nfsd42_encode_write_res()
4806 if (!p) in nfsd42_encode_write_res()
4809 p = xdr_encode_hyper(p, write->wr_bytes_written); in nfsd42_encode_write_res()
4810 *p++ = cpu_to_be32(write->wr_stable_how); in nfsd42_encode_write_res()
4811 p = xdr_encode_opaque_fixed(p, write->wr_verifier.data, in nfsd42_encode_write_res()
4821 __be32 *p; in nfsd42_encode_nl4_server() local
4823 p = xdr_reserve_space(xdr, 4); in nfsd42_encode_nl4_server()
4824 *p++ = cpu_to_be32(ns->nl4_type); in nfsd42_encode_nl4_server()
4833 p = xdr_reserve_space(xdr, in nfsd42_encode_nl4_server()
4838 if (!p) in nfsd42_encode_nl4_server()
4841 *p++ = cpu_to_be32(addr->netid_len); in nfsd42_encode_nl4_server()
4842 p = xdr_encode_opaque_fixed(p, addr->netid, in nfsd42_encode_nl4_server()
4844 *p++ = cpu_to_be32(addr->addr_len); in nfsd42_encode_nl4_server()
4845 p = xdr_encode_opaque_fixed(p, addr->addr, in nfsd42_encode_nl4_server()
4861 __be32 *p; in nfsd4_encode_copy() local
4868 p = xdr_reserve_space(resp->xdr, 4 + 4); in nfsd4_encode_copy()
4869 *p++ = xdr_one; /* cr_consecutive */ in nfsd4_encode_copy()
4870 *p = nfsd4_copy_is_sync(copy) ? xdr_one : xdr_zero; in nfsd4_encode_copy()
4880 __be32 *p; in nfsd4_encode_offload_status() local
4882 p = xdr_reserve_space(xdr, 8 + 4); in nfsd4_encode_offload_status()
4883 if (!p) in nfsd4_encode_offload_status()
4885 p = xdr_encode_hyper(p, os->count); in nfsd4_encode_offload_status()
4886 *p++ = cpu_to_be32(0); in nfsd4_encode_offload_status()
4898 __be32 nfserr, *p; in nfsd4_encode_read_plus_data() local
4901 p = xdr_reserve_space(xdr, 4 + 8 + 4); in nfsd4_encode_read_plus_data()
4902 if (!p) in nfsd4_encode_read_plus_data()
4919 *p++ = cpu_to_be32(NFS4_CONTENT_DATA); in nfsd4_encode_read_plus_data()
4920 p = xdr_encode_hyper(p, read->rd_offset); in nfsd4_encode_read_plus_data()
4921 *p = cpu_to_be32(read->rd_length); in nfsd4_encode_read_plus_data()
4935 __be32 *p; in nfsd4_encode_read_plus() local
4941 p = xdr_reserve_space(xdr, 4 + 4); in nfsd4_encode_read_plus()
4942 if (!p) in nfsd4_encode_read_plus()
4959 p = xdr_encode_bool(p, read->rd_eof); in nfsd4_encode_read_plus()
4960 *p = cpu_to_be32(segments); in nfsd4_encode_read_plus()
4970 __be32 *p; in nfsd4_encode_copy_notify() local
4976 p = xdr_reserve_space(xdr, 12); in nfsd4_encode_copy_notify()
4977 if (!p) in nfsd4_encode_copy_notify()
4981 p = xdr_encode_hyper(p, cn->cpn_sec); in nfsd4_encode_copy_notify()
4982 *p++ = cpu_to_be32(cn->cpn_nsec); in nfsd4_encode_copy_notify()
4990 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_copy_notify()
4991 if (!p) in nfsd4_encode_copy_notify()
4994 *p++ = cpu_to_be32(1); in nfsd4_encode_copy_notify()
5005 __be32 *p; in nfsd4_encode_seek() local
5007 p = xdr_reserve_space(resp->xdr, 4 + 8); in nfsd4_encode_seek()
5008 *p++ = cpu_to_be32(seek->seek_eof); in nfsd4_encode_seek()
5009 p = xdr_encode_hyper(p, seek->seek_pos); in nfsd4_encode_seek()
5016 union nfsd4_op_u *p) in nfsd4_encode_noop() argument
5028 __be32 *p; in nfsd4_vbuf_to_stream() local
5031 ((void *)xdr->end - (void *)xdr->p)); in nfsd4_vbuf_to_stream()
5032 p = xdr_reserve_space(xdr, cplen); in nfsd4_vbuf_to_stream()
5033 if (!p) in nfsd4_vbuf_to_stream()
5036 memcpy(p, buf, cplen); in nfsd4_vbuf_to_stream()
5042 p = xdr_reserve_space(xdr, cplen); in nfsd4_vbuf_to_stream()
5043 if (!p) in nfsd4_vbuf_to_stream()
5046 memcpy(p, buf, cplen); in nfsd4_vbuf_to_stream()
5054 xdr_encode_opaque_fixed(p, NULL, cplen); in nfsd4_vbuf_to_stream()
5071 __be32 *p, err; in nfsd4_encode_getxattr() local
5073 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_getxattr()
5074 if (!p) in nfsd4_encode_getxattr()
5077 *p = cpu_to_be32(getxattr->getxa_len); in nfsd4_encode_getxattr()
5137 __be32 *p; in nfsd4_encode_listxattrs() local
5152 p = xdr_reserve_space(xdr, 12); in nfsd4_encode_listxattrs()
5153 if (!p) { in nfsd4_encode_listxattrs()
5194 p = xdr_reserve_space(xdr, xdrlen); in nfsd4_encode_listxattrs()
5195 if (!p) { in nfsd4_encode_listxattrs()
5200 xdr_encode_opaque(p, sp, slen); in nfsd4_encode_listxattrs()
5219 p = xdr_reserve_space(xdr, 4); in nfsd4_encode_listxattrs()
5220 if (!p) { in nfsd4_encode_listxattrs()
5224 *p = cpu_to_be32(eof); in nfsd4_encode_listxattrs()
5382 __be32 *p; in nfsd4_encode_operation() local
5384 p = xdr_reserve_space(xdr, 8); in nfsd4_encode_operation()
5385 if (!p) in nfsd4_encode_operation()
5387 *p++ = cpu_to_be32(op->opnum); in nfsd4_encode_operation()
5440 *p = op->status; in nfsd4_encode_operation()
5461 __be32 *p; in nfsd4_encode_replay() local
5464 p = xdr_reserve_space(xdr, 8 + rp->rp_buflen); in nfsd4_encode_replay()
5465 if (!p) { in nfsd4_encode_replay()
5469 *p++ = cpu_to_be32(op->opnum); in nfsd4_encode_replay()
5470 *p++ = rp->rp_status; /* already xdr'ed */ in nfsd4_encode_replay()
5472 p = xdr_encode_opaque_fixed(p, rp->rp_buf, rp->rp_buflen); in nfsd4_encode_replay()
5509 __be32 *p; in nfs4svc_encode_compoundres() local
5515 p = resp->statusp; in nfs4svc_encode_compoundres()
5517 *p++ = resp->cstate.status; in nfs4svc_encode_compoundres()
5518 *p++ = htonl(resp->taglen); in nfs4svc_encode_compoundres()
5519 memcpy(p, resp->tag, resp->taglen); in nfs4svc_encode_compoundres()
5520 p += XDR_QUADLEN(resp->taglen); in nfs4svc_encode_compoundres()
5521 *p++ = htonl(resp->opcnt); in nfs4svc_encode_compoundres()