Lines Matching refs:p
137 __be32 *p = xdr_reserve_space(xdr, 4); in encode_uint32() local
138 *p = cpu_to_be32(value); in encode_uint32()
143 __be32 *p; in decode_uint32() local
145 p = xdr_inline_decode(xdr, 4); in decode_uint32()
146 if (unlikely(!p)) in decode_uint32()
148 *value = be32_to_cpup(p); in decode_uint32()
154 __be32 *p; in decode_uint64() local
156 p = xdr_inline_decode(xdr, 8); in decode_uint64()
157 if (unlikely(!p)) in decode_uint64()
159 xdr_decode_hyper(p, value); in decode_uint64()
168 static __be32 *xdr_decode_fileid3(__be32 *p, u64 *fileid) in xdr_decode_fileid3() argument
170 return xdr_decode_hyper(p, fileid); in xdr_decode_fileid3()
186 __be32 *p; in encode_filename3() local
189 p = xdr_reserve_space(xdr, 4 + length); in encode_filename3()
190 xdr_encode_opaque(p, name, length); in encode_filename3()
196 __be32 *p; in decode_inline_filename3() local
199 p = xdr_inline_decode(xdr, 4); in decode_inline_filename3()
200 if (unlikely(!p)) in decode_inline_filename3()
202 count = be32_to_cpup(p); in decode_inline_filename3()
205 p = xdr_inline_decode(xdr, count); in decode_inline_filename3()
206 if (unlikely(!p)) in decode_inline_filename3()
208 *name = (const char *)p; in decode_inline_filename3()
232 __be32 *p; in decode_nfspath3() local
234 p = xdr_inline_decode(xdr, 4); in decode_nfspath3()
235 if (unlikely(!p)) in decode_nfspath3()
237 count = be32_to_cpup(p); in decode_nfspath3()
260 static __be32 *xdr_encode_cookie3(__be32 *p, u64 cookie) in xdr_encode_cookie3() argument
262 return xdr_encode_hyper(p, cookie); in xdr_encode_cookie3()
275 static __be32 *xdr_encode_cookieverf3(__be32 *p, const __be32 *verifier) in xdr_encode_cookieverf3() argument
277 memcpy(p, verifier, NFS3_COOKIEVERFSIZE); in xdr_encode_cookieverf3()
278 return p + XDR_QUADLEN(NFS3_COOKIEVERFSIZE); in xdr_encode_cookieverf3()
283 __be32 *p; in decode_cookieverf3() local
285 p = xdr_inline_decode(xdr, NFS3_COOKIEVERFSIZE); in decode_cookieverf3()
286 if (unlikely(!p)) in decode_cookieverf3()
288 memcpy(verifier, p, NFS3_COOKIEVERFSIZE); in decode_cookieverf3()
299 __be32 *p; in encode_createverf3() local
301 p = xdr_reserve_space(xdr, NFS3_CREATEVERFSIZE); in encode_createverf3()
302 memcpy(p, verifier, NFS3_CREATEVERFSIZE); in encode_createverf3()
307 __be32 *p; in decode_writeverf3() local
309 p = xdr_inline_decode(xdr, NFS3_WRITEVERFSIZE); in decode_writeverf3()
310 if (unlikely(!p)) in decode_writeverf3()
312 memcpy(verifier->data, p, NFS3_WRITEVERFSIZE); in decode_writeverf3()
321 static __be32 *xdr_decode_size3(__be32 *p, u64 *size) in xdr_decode_size3() argument
323 return xdr_decode_hyper(p, size); in xdr_decode_size3()
338 __be32 *p; in decode_nfsstat3() local
340 p = xdr_inline_decode(xdr, 4); in decode_nfsstat3()
341 if (unlikely(!p)) in decode_nfsstat3()
343 if (unlikely(*p != cpu_to_be32(NFS3_OK))) in decode_nfsstat3()
348 *status = be32_to_cpup(p); in decode_nfsstat3()
371 static __be32 *xdr_decode_ftype3(__be32 *p, umode_t *mode) in xdr_decode_ftype3() argument
375 type = be32_to_cpup(p++); in xdr_decode_ftype3()
379 return p; in xdr_decode_ftype3()
392 __be32 *p; in encode_specdata3() local
394 p = xdr_reserve_space(xdr, 8); in encode_specdata3()
395 *p++ = cpu_to_be32(MAJOR(rdev)); in encode_specdata3()
396 *p = cpu_to_be32(MINOR(rdev)); in encode_specdata3()
399 static __be32 *xdr_decode_specdata3(__be32 *p, dev_t *rdev) in xdr_decode_specdata3() argument
403 major = be32_to_cpup(p++); in xdr_decode_specdata3()
404 minor = be32_to_cpup(p++); in xdr_decode_specdata3()
408 return p; in xdr_decode_specdata3()
420 __be32 *p; in encode_nfs_fh3() local
423 p = xdr_reserve_space(xdr, 4 + fh->size); in encode_nfs_fh3()
424 xdr_encode_opaque(p, fh->data, fh->size); in encode_nfs_fh3()
430 __be32 *p; in decode_nfs_fh3() local
432 p = xdr_inline_decode(xdr, 4); in decode_nfs_fh3()
433 if (unlikely(!p)) in decode_nfs_fh3()
435 length = be32_to_cpup(p++); in decode_nfs_fh3()
438 p = xdr_inline_decode(xdr, length); in decode_nfs_fh3()
439 if (unlikely(!p)) in decode_nfs_fh3()
442 memcpy(fh->data, p, length); in decode_nfs_fh3()
462 static __be32 *xdr_encode_nfstime3(__be32 *p, const struct timespec64 *timep) in xdr_encode_nfstime3() argument
464 *p++ = cpu_to_be32((u32)timep->tv_sec); in xdr_encode_nfstime3()
465 *p++ = cpu_to_be32(timep->tv_nsec); in xdr_encode_nfstime3()
466 return p; in xdr_encode_nfstime3()
469 static __be32 *xdr_decode_nfstime3(__be32 *p, struct timespec64 *timep) in xdr_decode_nfstime3() argument
471 timep->tv_sec = be32_to_cpup(p++); in xdr_decode_nfstime3()
472 timep->tv_nsec = be32_to_cpup(p++); in xdr_decode_nfstime3()
473 return p; in xdr_decode_nfstime3()
540 __be32 *p; in encode_sattr3() local
561 p = xdr_reserve_space(xdr, nbytes); in encode_sattr3()
564 *p++ = xdr_one; in encode_sattr3()
565 *p++ = cpu_to_be32(attr->ia_mode & S_IALLUGO); in encode_sattr3()
567 *p++ = xdr_zero; in encode_sattr3()
570 *p++ = xdr_one; in encode_sattr3()
571 *p++ = cpu_to_be32(from_kuid_munged(userns, attr->ia_uid)); in encode_sattr3()
573 *p++ = xdr_zero; in encode_sattr3()
576 *p++ = xdr_one; in encode_sattr3()
577 *p++ = cpu_to_be32(from_kgid_munged(userns, attr->ia_gid)); in encode_sattr3()
579 *p++ = xdr_zero; in encode_sattr3()
582 *p++ = xdr_one; in encode_sattr3()
583 p = xdr_encode_hyper(p, (u64)attr->ia_size); in encode_sattr3()
585 *p++ = xdr_zero; in encode_sattr3()
588 *p++ = xdr_two; in encode_sattr3()
589 p = xdr_encode_nfstime3(p, &attr->ia_atime); in encode_sattr3()
591 *p++ = xdr_one; in encode_sattr3()
593 *p++ = xdr_zero; in encode_sattr3()
596 *p++ = xdr_two; in encode_sattr3()
597 xdr_encode_nfstime3(p, &attr->ia_mtime); in encode_sattr3()
599 *p = xdr_one; in encode_sattr3()
601 *p = xdr_zero; in encode_sattr3()
627 __be32 *p; in decode_fattr3() local
629 p = xdr_inline_decode(xdr, NFS3_fattr_sz << 2); in decode_fattr3()
630 if (unlikely(!p)) in decode_fattr3()
633 p = xdr_decode_ftype3(p, &fmode); in decode_fattr3()
635 fattr->mode = (be32_to_cpup(p++) & ~S_IFMT) | fmode; in decode_fattr3()
636 fattr->nlink = be32_to_cpup(p++); in decode_fattr3()
637 fattr->uid = make_kuid(userns, be32_to_cpup(p++)); in decode_fattr3()
640 fattr->gid = make_kgid(userns, be32_to_cpup(p++)); in decode_fattr3()
644 p = xdr_decode_size3(p, &fattr->size); in decode_fattr3()
645 p = xdr_decode_size3(p, &fattr->du.nfs3.used); in decode_fattr3()
646 p = xdr_decode_specdata3(p, &fattr->rdev); in decode_fattr3()
648 p = xdr_decode_hyper(p, &fattr->fsid.major); in decode_fattr3()
651 p = xdr_decode_fileid3(p, &fattr->fileid); in decode_fattr3()
652 p = xdr_decode_nfstime3(p, &fattr->atime); in decode_fattr3()
653 p = xdr_decode_nfstime3(p, &fattr->mtime); in decode_fattr3()
654 xdr_decode_nfstime3(p, &fattr->ctime); in decode_fattr3()
680 __be32 *p; in decode_post_op_attr() local
682 p = xdr_inline_decode(xdr, 4); in decode_post_op_attr()
683 if (unlikely(!p)) in decode_post_op_attr()
685 if (*p != xdr_zero) in decode_post_op_attr()
700 __be32 *p; in decode_wcc_attr() local
702 p = xdr_inline_decode(xdr, NFS3_wcc_attr_sz << 2); in decode_wcc_attr()
703 if (unlikely(!p)) in decode_wcc_attr()
711 p = xdr_decode_size3(p, &fattr->pre_size); in decode_wcc_attr()
712 p = xdr_decode_nfstime3(p, &fattr->pre_mtime); in decode_wcc_attr()
713 xdr_decode_nfstime3(p, &fattr->pre_ctime); in decode_wcc_attr()
737 __be32 *p; in decode_pre_op_attr() local
739 p = xdr_inline_decode(xdr, 4); in decode_pre_op_attr()
740 if (unlikely(!p)) in decode_pre_op_attr()
742 if (*p != xdr_zero) in decode_pre_op_attr()
772 __be32 *p = xdr_inline_decode(xdr, 4); in decode_post_op_fh3() local
773 if (unlikely(!p)) in decode_post_op_fh3()
775 if (*p != xdr_zero) in decode_post_op_fh3()
839 __be32 *p; in encode_sattrguard3() local
842 p = xdr_reserve_space(xdr, 4 + 8); in encode_sattrguard3()
843 *p++ = xdr_one; in encode_sattrguard3()
844 xdr_encode_nfstime3(p, &args->guardtime); in encode_sattrguard3()
846 p = xdr_reserve_space(xdr, 4); in encode_sattrguard3()
847 *p = xdr_zero; in encode_sattrguard3()
931 __be32 *p; in encode_read3args() local
935 p = xdr_reserve_space(xdr, 8 + 4); in encode_read3args()
936 p = xdr_encode_hyper(p, args->offset); in encode_read3args()
937 *p = cpu_to_be32(args->count); in encode_read3args()
974 __be32 *p; in encode_write3args() local
978 p = xdr_reserve_space(xdr, 8 + 4 + 4 + 4); in encode_write3args()
979 p = xdr_encode_hyper(p, args->offset); in encode_write3args()
980 *p++ = cpu_to_be32(args->count); in encode_write3args()
981 *p++ = cpu_to_be32(args->stable); in encode_write3args()
982 *p = cpu_to_be32(args->count); in encode_write3args()
1229 __be32 *p; in encode_readdir3args() local
1233 p = xdr_reserve_space(xdr, 8 + NFS3_COOKIEVERFSIZE + 4); in encode_readdir3args()
1234 p = xdr_encode_cookie3(p, args->cookie); in encode_readdir3args()
1235 p = xdr_encode_cookieverf3(p, args->verf); in encode_readdir3args()
1236 *p = cpu_to_be32(args->count); in encode_readdir3args()
1266 __be32 *p; in encode_readdirplus3args() local
1270 p = xdr_reserve_space(xdr, 8 + NFS3_COOKIEVERFSIZE + 4 + 4); in encode_readdirplus3args()
1271 p = xdr_encode_cookie3(p, args->cookie); in encode_readdirplus3args()
1272 p = xdr_encode_cookieverf3(p, args->verf); in encode_readdirplus3args()
1278 *p++ = cpu_to_be32(dircount); in encode_readdirplus3args()
1279 *p = cpu_to_be32(maxcount); in encode_readdirplus3args()
1305 __be32 *p; in encode_commit3args() local
1309 p = xdr_reserve_space(xdr, 8 + 4); in encode_commit3args()
1310 p = xdr_encode_hyper(p, args->offset); in encode_commit3args()
1311 *p = cpu_to_be32(args->count); in encode_commit3args()
1609 __be32 *p; in decode_read3resok() local
1611 p = xdr_inline_decode(xdr, 4 + 4 + 4); in decode_read3resok()
1612 if (unlikely(!p)) in decode_read3resok()
1614 count = be32_to_cpup(p++); in decode_read3resok()
1615 eof = be32_to_cpup(p++); in decode_read3resok()
1616 ocount = be32_to_cpup(p++); in decode_read3resok()
1694 __be32 *p; in decode_write3resok() local
1696 p = xdr_inline_decode(xdr, 4 + 4); in decode_write3resok()
1697 if (unlikely(!p)) in decode_write3resok()
1699 result->count = be32_to_cpup(p++); in decode_write3resok()
1700 result->verf->committed = be32_to_cpup(p++); in decode_write3resok()
1971 __be32 *p; in nfs3_decode_dirent() local
1975 p = xdr_inline_decode(xdr, 4); in nfs3_decode_dirent()
1976 if (unlikely(!p)) in nfs3_decode_dirent()
1978 if (*p == xdr_zero) { in nfs3_decode_dirent()
1979 p = xdr_inline_decode(xdr, 4); in nfs3_decode_dirent()
1980 if (unlikely(!p)) in nfs3_decode_dirent()
1982 if (*p == xdr_zero) in nfs3_decode_dirent()
2016 p = xdr_inline_decode(xdr, 4); in nfs3_decode_dirent()
2017 if (unlikely(!p)) in nfs3_decode_dirent()
2019 if (*p != xdr_zero) { in nfs3_decode_dirent()
2135 __be32 *p; in decode_fsstat3resok() local
2137 p = xdr_inline_decode(xdr, 8 * 6 + 4); in decode_fsstat3resok()
2138 if (unlikely(!p)) in decode_fsstat3resok()
2140 p = xdr_decode_size3(p, &result->tbytes); in decode_fsstat3resok()
2141 p = xdr_decode_size3(p, &result->fbytes); in decode_fsstat3resok()
2142 p = xdr_decode_size3(p, &result->abytes); in decode_fsstat3resok()
2143 p = xdr_decode_size3(p, &result->tfiles); in decode_fsstat3resok()
2144 p = xdr_decode_size3(p, &result->ffiles); in decode_fsstat3resok()
2145 xdr_decode_size3(p, &result->afiles); in decode_fsstat3resok()
2204 __be32 *p; in decode_fsinfo3resok() local
2206 p = xdr_inline_decode(xdr, 4 * 7 + 8 + 8 + 4); in decode_fsinfo3resok()
2207 if (unlikely(!p)) in decode_fsinfo3resok()
2209 result->rtmax = be32_to_cpup(p++); in decode_fsinfo3resok()
2210 result->rtpref = be32_to_cpup(p++); in decode_fsinfo3resok()
2211 result->rtmult = be32_to_cpup(p++); in decode_fsinfo3resok()
2212 result->wtmax = be32_to_cpup(p++); in decode_fsinfo3resok()
2213 result->wtpref = be32_to_cpup(p++); in decode_fsinfo3resok()
2214 result->wtmult = be32_to_cpup(p++); in decode_fsinfo3resok()
2215 result->dtpref = be32_to_cpup(p++); in decode_fsinfo3resok()
2216 p = xdr_decode_size3(p, &result->maxfilesize); in decode_fsinfo3resok()
2217 xdr_decode_nfstime3(p, &result->time_delta); in decode_fsinfo3resok()
2276 __be32 *p; in decode_pathconf3resok() local
2278 p = xdr_inline_decode(xdr, 4 * 6); in decode_pathconf3resok()
2279 if (unlikely(!p)) in decode_pathconf3resok()
2281 result->max_link = be32_to_cpup(p++); in decode_pathconf3resok()
2282 result->max_namelen = be32_to_cpup(p); in decode_pathconf3resok()