Lines Matching refs:p

127 		func, xdr->end - xdr->p);  in print_overflow_msg()
144 __be32 *p = xdr_reserve_space(xdr, 4); in encode_uint32() local
145 *p = cpu_to_be32(value); in encode_uint32()
150 __be32 *p; in decode_uint32() local
152 p = xdr_inline_decode(xdr, 4); in decode_uint32()
153 if (unlikely(p == NULL)) in decode_uint32()
155 *value = be32_to_cpup(p); in decode_uint32()
164 __be32 *p; in decode_uint64() local
166 p = xdr_inline_decode(xdr, 8); in decode_uint64()
167 if (unlikely(p == NULL)) in decode_uint64()
169 xdr_decode_hyper(p, value); in decode_uint64()
181 static __be32 *xdr_decode_fileid3(__be32 *p, u64 *fileid) in xdr_decode_fileid3() argument
183 return xdr_decode_hyper(p, fileid); in xdr_decode_fileid3()
199 __be32 *p; in encode_filename3() local
202 p = xdr_reserve_space(xdr, 4 + length); in encode_filename3()
203 xdr_encode_opaque(p, name, length); in encode_filename3()
209 __be32 *p; in decode_inline_filename3() local
212 p = xdr_inline_decode(xdr, 4); in decode_inline_filename3()
213 if (unlikely(p == NULL)) in decode_inline_filename3()
215 count = be32_to_cpup(p); in decode_inline_filename3()
218 p = xdr_inline_decode(xdr, count); in decode_inline_filename3()
219 if (unlikely(p == NULL)) in decode_inline_filename3()
221 *name = (const char *)p; in decode_inline_filename3()
248 __be32 *p; in decode_nfspath3() local
250 p = xdr_inline_decode(xdr, 4); in decode_nfspath3()
251 if (unlikely(p == NULL)) in decode_nfspath3()
253 count = be32_to_cpup(p); in decode_nfspath3()
279 static __be32 *xdr_encode_cookie3(__be32 *p, u64 cookie) in xdr_encode_cookie3() argument
281 return xdr_encode_hyper(p, cookie); in xdr_encode_cookie3()
294 static __be32 *xdr_encode_cookieverf3(__be32 *p, const __be32 *verifier) in xdr_encode_cookieverf3() argument
296 memcpy(p, verifier, NFS3_COOKIEVERFSIZE); in xdr_encode_cookieverf3()
297 return p + XDR_QUADLEN(NFS3_COOKIEVERFSIZE); in xdr_encode_cookieverf3()
302 __be32 *p; in decode_cookieverf3() local
304 p = xdr_inline_decode(xdr, NFS3_COOKIEVERFSIZE); in decode_cookieverf3()
305 if (unlikely(p == NULL)) in decode_cookieverf3()
307 memcpy(verifier, p, NFS3_COOKIEVERFSIZE); in decode_cookieverf3()
321 __be32 *p; in encode_createverf3() local
323 p = xdr_reserve_space(xdr, NFS3_CREATEVERFSIZE); in encode_createverf3()
324 memcpy(p, verifier, NFS3_CREATEVERFSIZE); in encode_createverf3()
329 __be32 *p; in decode_writeverf3() local
331 p = xdr_inline_decode(xdr, NFS3_WRITEVERFSIZE); in decode_writeverf3()
332 if (unlikely(p == NULL)) in decode_writeverf3()
334 memcpy(verifier->data, p, NFS3_WRITEVERFSIZE); in decode_writeverf3()
346 static __be32 *xdr_decode_size3(__be32 *p, u64 *size) in xdr_decode_size3() argument
348 return xdr_decode_hyper(p, size); in xdr_decode_size3()
363 __be32 *p; in decode_nfsstat3() local
365 p = xdr_inline_decode(xdr, 4); in decode_nfsstat3()
366 if (unlikely(p == NULL)) in decode_nfsstat3()
368 *status = be32_to_cpup(p); in decode_nfsstat3()
393 static __be32 *xdr_decode_ftype3(__be32 *p, umode_t *mode) in xdr_decode_ftype3() argument
397 type = be32_to_cpup(p++); in xdr_decode_ftype3()
401 return p; in xdr_decode_ftype3()
414 __be32 *p; in encode_specdata3() local
416 p = xdr_reserve_space(xdr, 8); in encode_specdata3()
417 *p++ = cpu_to_be32(MAJOR(rdev)); in encode_specdata3()
418 *p = cpu_to_be32(MINOR(rdev)); in encode_specdata3()
421 static __be32 *xdr_decode_specdata3(__be32 *p, dev_t *rdev) in xdr_decode_specdata3() argument
425 major = be32_to_cpup(p++); in xdr_decode_specdata3()
426 minor = be32_to_cpup(p++); in xdr_decode_specdata3()
430 return p; in xdr_decode_specdata3()
442 __be32 *p; in encode_nfs_fh3() local
445 p = xdr_reserve_space(xdr, 4 + fh->size); in encode_nfs_fh3()
446 xdr_encode_opaque(p, fh->data, fh->size); in encode_nfs_fh3()
452 __be32 *p; in decode_nfs_fh3() local
454 p = xdr_inline_decode(xdr, 4); in decode_nfs_fh3()
455 if (unlikely(p == NULL)) in decode_nfs_fh3()
457 length = be32_to_cpup(p++); in decode_nfs_fh3()
460 p = xdr_inline_decode(xdr, length); in decode_nfs_fh3()
461 if (unlikely(p == NULL)) in decode_nfs_fh3()
464 memcpy(fh->data, p, length); in decode_nfs_fh3()
487 static __be32 *xdr_encode_nfstime3(__be32 *p, const struct timespec *timep) in xdr_encode_nfstime3() argument
489 *p++ = cpu_to_be32(timep->tv_sec); in xdr_encode_nfstime3()
490 *p++ = cpu_to_be32(timep->tv_nsec); in xdr_encode_nfstime3()
491 return p; in xdr_encode_nfstime3()
494 static __be32 *xdr_decode_nfstime3(__be32 *p, struct timespec *timep) in xdr_decode_nfstime3() argument
496 timep->tv_sec = be32_to_cpup(p++); in xdr_decode_nfstime3()
497 timep->tv_nsec = be32_to_cpup(p++); in xdr_decode_nfstime3()
498 return p; in xdr_decode_nfstime3()
564 __be32 *p; in encode_sattr3() local
585 p = xdr_reserve_space(xdr, nbytes); in encode_sattr3()
588 *p++ = xdr_one; in encode_sattr3()
589 *p++ = cpu_to_be32(attr->ia_mode & S_IALLUGO); in encode_sattr3()
591 *p++ = xdr_zero; in encode_sattr3()
594 *p++ = xdr_one; in encode_sattr3()
595 *p++ = cpu_to_be32(from_kuid(&init_user_ns, attr->ia_uid)); in encode_sattr3()
597 *p++ = xdr_zero; in encode_sattr3()
600 *p++ = xdr_one; in encode_sattr3()
601 *p++ = cpu_to_be32(from_kgid(&init_user_ns, attr->ia_gid)); in encode_sattr3()
603 *p++ = xdr_zero; in encode_sattr3()
606 *p++ = xdr_one; in encode_sattr3()
607 p = xdr_encode_hyper(p, (u64)attr->ia_size); in encode_sattr3()
609 *p++ = xdr_zero; in encode_sattr3()
612 *p++ = xdr_two; in encode_sattr3()
613 p = xdr_encode_nfstime3(p, &attr->ia_atime); in encode_sattr3()
615 *p++ = xdr_one; in encode_sattr3()
617 *p++ = xdr_zero; in encode_sattr3()
620 *p++ = xdr_two; in encode_sattr3()
621 xdr_encode_nfstime3(p, &attr->ia_mtime); in encode_sattr3()
623 *p = xdr_one; in encode_sattr3()
625 *p = xdr_zero; in encode_sattr3()
650 __be32 *p; in decode_fattr3() local
652 p = xdr_inline_decode(xdr, NFS3_fattr_sz << 2); in decode_fattr3()
653 if (unlikely(p == NULL)) in decode_fattr3()
656 p = xdr_decode_ftype3(p, &fmode); in decode_fattr3()
658 fattr->mode = (be32_to_cpup(p++) & ~S_IFMT) | fmode; in decode_fattr3()
659 fattr->nlink = be32_to_cpup(p++); in decode_fattr3()
660 fattr->uid = make_kuid(&init_user_ns, be32_to_cpup(p++)); in decode_fattr3()
663 fattr->gid = make_kgid(&init_user_ns, be32_to_cpup(p++)); in decode_fattr3()
667 p = xdr_decode_size3(p, &fattr->size); in decode_fattr3()
668 p = xdr_decode_size3(p, &fattr->du.nfs3.used); in decode_fattr3()
669 p = xdr_decode_specdata3(p, &fattr->rdev); in decode_fattr3()
671 p = xdr_decode_hyper(p, &fattr->fsid.major); in decode_fattr3()
674 p = xdr_decode_fileid3(p, &fattr->fileid); in decode_fattr3()
675 p = xdr_decode_nfstime3(p, &fattr->atime); in decode_fattr3()
676 p = xdr_decode_nfstime3(p, &fattr->mtime); in decode_fattr3()
677 xdr_decode_nfstime3(p, &fattr->ctime); in decode_fattr3()
705 __be32 *p; in decode_post_op_attr() local
707 p = xdr_inline_decode(xdr, 4); in decode_post_op_attr()
708 if (unlikely(p == NULL)) in decode_post_op_attr()
710 if (*p != xdr_zero) in decode_post_op_attr()
728 __be32 *p; in decode_wcc_attr() local
730 p = xdr_inline_decode(xdr, NFS3_wcc_attr_sz << 2); in decode_wcc_attr()
731 if (unlikely(p == NULL)) in decode_wcc_attr()
739 p = xdr_decode_size3(p, &fattr->pre_size); in decode_wcc_attr()
740 p = xdr_decode_nfstime3(p, &fattr->pre_mtime); in decode_wcc_attr()
741 xdr_decode_nfstime3(p, &fattr->pre_ctime); in decode_wcc_attr()
768 __be32 *p; in decode_pre_op_attr() local
770 p = xdr_inline_decode(xdr, 4); in decode_pre_op_attr()
771 if (unlikely(p == NULL)) in decode_pre_op_attr()
773 if (*p != xdr_zero) in decode_pre_op_attr()
805 __be32 *p = xdr_inline_decode(xdr, 4); in decode_post_op_fh3() local
806 if (unlikely(p == NULL)) in decode_post_op_fh3()
808 if (*p != xdr_zero) in decode_post_op_fh3()
873 __be32 *p; in encode_sattrguard3() local
876 p = xdr_reserve_space(xdr, 4 + 8); in encode_sattrguard3()
877 *p++ = xdr_one; in encode_sattrguard3()
878 xdr_encode_nfstime3(p, &args->guardtime); in encode_sattrguard3()
880 p = xdr_reserve_space(xdr, 4); in encode_sattrguard3()
881 *p = xdr_zero; in encode_sattrguard3()
958 __be32 *p; in encode_read3args() local
962 p = xdr_reserve_space(xdr, 8 + 4); in encode_read3args()
963 p = xdr_encode_hyper(p, args->offset); in encode_read3args()
964 *p = cpu_to_be32(args->count); in encode_read3args()
997 __be32 *p; in encode_write3args() local
1001 p = xdr_reserve_space(xdr, 8 + 4 + 4 + 4); in encode_write3args()
1002 p = xdr_encode_hyper(p, args->offset); in encode_write3args()
1003 *p++ = cpu_to_be32(args->count); in encode_write3args()
1004 *p++ = cpu_to_be32(args->stable); in encode_write3args()
1005 *p = cpu_to_be32(args->count); in encode_write3args()
1230 __be32 *p; in encode_readdir3args() local
1234 p = xdr_reserve_space(xdr, 8 + NFS3_COOKIEVERFSIZE + 4); in encode_readdir3args()
1235 p = xdr_encode_cookie3(p, args->cookie); in encode_readdir3args()
1236 p = xdr_encode_cookieverf3(p, args->verf); in encode_readdir3args()
1237 *p = cpu_to_be32(args->count); in encode_readdir3args()
1263 __be32 *p; in encode_readdirplus3args() local
1267 p = xdr_reserve_space(xdr, 8 + NFS3_COOKIEVERFSIZE + 4 + 4); in encode_readdirplus3args()
1268 p = xdr_encode_cookie3(p, args->cookie); in encode_readdirplus3args()
1269 p = xdr_encode_cookieverf3(p, args->verf); in encode_readdirplus3args()
1275 *p++ = cpu_to_be32(args->count >> 3); in encode_readdirplus3args()
1277 *p = cpu_to_be32(args->count); in encode_readdirplus3args()
1301 __be32 *p; in encode_commit3args() local
1305 p = xdr_reserve_space(xdr, 8 + 4); in encode_commit3args()
1306 p = xdr_encode_hyper(p, args->offset); in encode_commit3args()
1307 *p = cpu_to_be32(args->count); in encode_commit3args()
1595 __be32 *p; in decode_read3resok() local
1597 p = xdr_inline_decode(xdr, 4 + 4 + 4); in decode_read3resok()
1598 if (unlikely(p == NULL)) in decode_read3resok()
1600 count = be32_to_cpup(p++); in decode_read3resok()
1601 eof = be32_to_cpup(p++); in decode_read3resok()
1602 ocount = be32_to_cpup(p++); in decode_read3resok()
1679 __be32 *p; in decode_write3resok() local
1681 p = xdr_inline_decode(xdr, 4 + 4); in decode_write3resok()
1682 if (unlikely(p == NULL)) in decode_write3resok()
1684 result->count = be32_to_cpup(p++); in decode_write3resok()
1685 result->verf->committed = be32_to_cpup(p++); in decode_write3resok()
1951 __be32 *p; in nfs3_decode_dirent() local
1954 p = xdr_inline_decode(xdr, 4); in nfs3_decode_dirent()
1955 if (unlikely(p == NULL)) in nfs3_decode_dirent()
1957 if (*p == xdr_zero) { in nfs3_decode_dirent()
1958 p = xdr_inline_decode(xdr, 4); in nfs3_decode_dirent()
1959 if (unlikely(p == NULL)) in nfs3_decode_dirent()
1961 if (*p == xdr_zero) in nfs3_decode_dirent()
1996 p = xdr_inline_decode(xdr, 4); in nfs3_decode_dirent()
1997 if (unlikely(p == NULL)) in nfs3_decode_dirent()
1999 if (*p != xdr_zero) { in nfs3_decode_dirent()
2122 __be32 *p; in decode_fsstat3resok() local
2124 p = xdr_inline_decode(xdr, 8 * 6 + 4); in decode_fsstat3resok()
2125 if (unlikely(p == NULL)) in decode_fsstat3resok()
2127 p = xdr_decode_size3(p, &result->tbytes); in decode_fsstat3resok()
2128 p = xdr_decode_size3(p, &result->fbytes); in decode_fsstat3resok()
2129 p = xdr_decode_size3(p, &result->abytes); in decode_fsstat3resok()
2130 p = xdr_decode_size3(p, &result->tfiles); in decode_fsstat3resok()
2131 p = xdr_decode_size3(p, &result->ffiles); in decode_fsstat3resok()
2132 xdr_decode_size3(p, &result->afiles); in decode_fsstat3resok()
2193 __be32 *p; in decode_fsinfo3resok() local
2195 p = xdr_inline_decode(xdr, 4 * 7 + 8 + 8 + 4); in decode_fsinfo3resok()
2196 if (unlikely(p == NULL)) in decode_fsinfo3resok()
2198 result->rtmax = be32_to_cpup(p++); in decode_fsinfo3resok()
2199 result->rtpref = be32_to_cpup(p++); in decode_fsinfo3resok()
2200 result->rtmult = be32_to_cpup(p++); in decode_fsinfo3resok()
2201 result->wtmax = be32_to_cpup(p++); in decode_fsinfo3resok()
2202 result->wtpref = be32_to_cpup(p++); in decode_fsinfo3resok()
2203 result->wtmult = be32_to_cpup(p++); in decode_fsinfo3resok()
2204 result->dtpref = be32_to_cpup(p++); in decode_fsinfo3resok()
2205 p = xdr_decode_size3(p, &result->maxfilesize); in decode_fsinfo3resok()
2206 xdr_decode_nfstime3(p, &result->time_delta); in decode_fsinfo3resok()
2265 __be32 *p; in decode_pathconf3resok() local
2267 p = xdr_inline_decode(xdr, 4 * 6); in decode_pathconf3resok()
2268 if (unlikely(p == NULL)) in decode_pathconf3resok()
2270 result->max_link = be32_to_cpup(p++); in decode_pathconf3resok()
2271 result->max_namelen = be32_to_cpup(p); in decode_pathconf3resok()