Lines Matching refs:p

100 	__be32 *p;  in decode_nfsdata()  local
102 p = xdr_inline_decode(xdr, 4); in decode_nfsdata()
103 if (unlikely(!p)) in decode_nfsdata()
105 count = be32_to_cpup(p); in decode_nfsdata()
144 __be32 *p; in decode_stat() local
146 p = xdr_inline_decode(xdr, 4); in decode_stat()
147 if (unlikely(!p)) in decode_stat()
149 if (unlikely(*p != cpu_to_be32(NFS_OK))) in decode_stat()
154 *status = be32_to_cpup(p); in decode_stat()
172 static __be32 *xdr_decode_ftype(__be32 *p, u32 *type) in xdr_decode_ftype() argument
174 *type = be32_to_cpup(p++); in xdr_decode_ftype()
177 return p; in xdr_decode_ftype()
187 __be32 *p; in encode_fhandle() local
189 p = xdr_reserve_space(xdr, NFS2_FHSIZE); in encode_fhandle()
190 memcpy(p, fh->data, NFS2_FHSIZE); in encode_fhandle()
195 __be32 *p; in decode_fhandle() local
197 p = xdr_inline_decode(xdr, NFS2_FHSIZE); in decode_fhandle()
198 if (unlikely(!p)) in decode_fhandle()
201 memcpy(fh->data, p, NFS2_FHSIZE); in decode_fhandle()
213 static __be32 *xdr_encode_time(__be32 *p, const struct timespec64 *timep) in xdr_encode_time() argument
215 *p++ = cpu_to_be32((u32)timep->tv_sec); in xdr_encode_time()
217 *p++ = cpu_to_be32(timep->tv_nsec / NSEC_PER_USEC); in xdr_encode_time()
219 *p++ = cpu_to_be32(0); in xdr_encode_time()
220 return p; in xdr_encode_time()
230 static __be32 *xdr_encode_current_server_time(__be32 *p, in xdr_encode_current_server_time() argument
233 *p++ = cpu_to_be32(timep->tv_sec); in xdr_encode_current_server_time()
234 *p++ = cpu_to_be32(1000000); in xdr_encode_current_server_time()
235 return p; in xdr_encode_current_server_time()
238 static __be32 *xdr_decode_time(__be32 *p, struct timespec64 *timep) in xdr_decode_time() argument
240 timep->tv_sec = be32_to_cpup(p++); in xdr_decode_time()
241 timep->tv_nsec = be32_to_cpup(p++) * NSEC_PER_USEC; in xdr_decode_time()
242 return p; in xdr_decode_time()
270 __be32 *p; in decode_fattr() local
272 p = xdr_inline_decode(xdr, NFS_fattr_sz << 2); in decode_fattr()
273 if (unlikely(!p)) in decode_fattr()
278 p = xdr_decode_ftype(p, &type); in decode_fattr()
280 fattr->mode = be32_to_cpup(p++); in decode_fattr()
281 fattr->nlink = be32_to_cpup(p++); in decode_fattr()
282 fattr->uid = make_kuid(userns, be32_to_cpup(p++)); in decode_fattr()
285 fattr->gid = make_kgid(userns, be32_to_cpup(p++)); in decode_fattr()
289 fattr->size = be32_to_cpup(p++); in decode_fattr()
290 fattr->du.nfs2.blocksize = be32_to_cpup(p++); in decode_fattr()
292 rdev = be32_to_cpup(p++); in decode_fattr()
299 fattr->du.nfs2.blocks = be32_to_cpup(p++); in decode_fattr()
300 fattr->fsid.major = be32_to_cpup(p++); in decode_fattr()
302 fattr->fileid = be32_to_cpup(p++); in decode_fattr()
304 p = xdr_decode_time(p, &fattr->atime); in decode_fattr()
305 p = xdr_decode_time(p, &fattr->mtime); in decode_fattr()
306 xdr_decode_time(p, &fattr->ctime); in decode_fattr()
333 static __be32 *xdr_time_not_set(__be32 *p) in xdr_time_not_set() argument
335 *p++ = cpu_to_be32(NFS2_SATTR_NOT_SET); in xdr_time_not_set()
336 *p++ = cpu_to_be32(NFS2_SATTR_NOT_SET); in xdr_time_not_set()
337 return p; in xdr_time_not_set()
343 __be32 *p; in encode_sattr() local
345 p = xdr_reserve_space(xdr, NFS_sattr_sz << 2); in encode_sattr()
348 *p++ = cpu_to_be32(attr->ia_mode); in encode_sattr()
350 *p++ = cpu_to_be32(NFS2_SATTR_NOT_SET); in encode_sattr()
352 *p++ = cpu_to_be32(from_kuid_munged(userns, attr->ia_uid)); in encode_sattr()
354 *p++ = cpu_to_be32(NFS2_SATTR_NOT_SET); in encode_sattr()
356 *p++ = cpu_to_be32(from_kgid_munged(userns, attr->ia_gid)); in encode_sattr()
358 *p++ = cpu_to_be32(NFS2_SATTR_NOT_SET); in encode_sattr()
360 *p++ = cpu_to_be32((u32)attr->ia_size); in encode_sattr()
362 *p++ = cpu_to_be32(NFS2_SATTR_NOT_SET); in encode_sattr()
365 p = xdr_encode_time(p, &attr->ia_atime); in encode_sattr()
367 p = xdr_encode_current_server_time(p, &attr->ia_atime); in encode_sattr()
369 p = xdr_time_not_set(p); in encode_sattr()
371 xdr_encode_time(p, &attr->ia_mtime); in encode_sattr()
373 xdr_encode_current_server_time(p, &attr->ia_mtime); in encode_sattr()
375 xdr_time_not_set(p); in encode_sattr()
386 __be32 *p; in encode_filename() local
389 p = xdr_reserve_space(xdr, 4 + length); in encode_filename()
390 xdr_encode_opaque(p, name, length); in encode_filename()
396 __be32 *p; in decode_filename_inline() local
399 p = xdr_inline_decode(xdr, 4); in decode_filename_inline()
400 if (unlikely(!p)) in decode_filename_inline()
402 count = be32_to_cpup(p); in decode_filename_inline()
405 p = xdr_inline_decode(xdr, count); in decode_filename_inline()
406 if (unlikely(!p)) in decode_filename_inline()
408 *name = (const char *)p; in decode_filename_inline()
423 __be32 *p; in encode_path() local
425 p = xdr_reserve_space(xdr, 4); in encode_path()
426 *p = cpu_to_be32(length); in encode_path()
433 __be32 *p; in decode_path() local
435 p = xdr_inline_decode(xdr, 4); in decode_path()
436 if (unlikely(!p)) in decode_path()
438 length = be32_to_cpup(p); in decode_path()
615 __be32 *p; in encode_readargs() local
619 p = xdr_reserve_space(xdr, 4 + 4 + 4); in encode_readargs()
620 *p++ = cpu_to_be32(offset); in encode_readargs()
621 *p++ = cpu_to_be32(count); in encode_readargs()
622 *p = cpu_to_be32(count); in encode_readargs()
653 __be32 *p; in encode_writeargs() local
657 p = xdr_reserve_space(xdr, 4 + 4 + 4 + 4); in encode_writeargs()
658 *p++ = cpu_to_be32(offset); in encode_writeargs()
659 *p++ = cpu_to_be32(offset); in encode_writeargs()
660 *p++ = cpu_to_be32(count); in encode_writeargs()
663 *p = cpu_to_be32(count); in encode_writeargs()
774 __be32 *p; in encode_readdirargs() local
778 p = xdr_reserve_space(xdr, 4 + 4); in encode_readdirargs()
779 *p++ = cpu_to_be32(args->cookie); in encode_readdirargs()
780 *p = cpu_to_be32(args->count); in encode_readdirargs()
929 __be32 *p; in nfs2_decode_dirent() local
932 p = xdr_inline_decode(xdr, 4); in nfs2_decode_dirent()
933 if (unlikely(!p)) in nfs2_decode_dirent()
935 if (*p++ == xdr_zero) { in nfs2_decode_dirent()
936 p = xdr_inline_decode(xdr, 4); in nfs2_decode_dirent()
937 if (unlikely(!p)) in nfs2_decode_dirent()
939 if (*p++ == xdr_zero) in nfs2_decode_dirent()
945 p = xdr_inline_decode(xdr, 4); in nfs2_decode_dirent()
946 if (unlikely(!p)) in nfs2_decode_dirent()
948 entry->ino = be32_to_cpup(p); in nfs2_decode_dirent()
958 p = xdr_inline_decode(xdr, 4); in nfs2_decode_dirent()
959 if (unlikely(!p)) in nfs2_decode_dirent()
961 entry->cookie = be32_to_cpup(p); in nfs2_decode_dirent()
1026 __be32 *p; in decode_info() local
1028 p = xdr_inline_decode(xdr, NFS_info_sz << 2); in decode_info()
1029 if (unlikely(!p)) in decode_info()
1031 result->tsize = be32_to_cpup(p++); in decode_info()
1032 result->bsize = be32_to_cpup(p++); in decode_info()
1033 result->blocks = be32_to_cpup(p++); in decode_info()
1034 result->bfree = be32_to_cpup(p++); in decode_info()
1035 result->bavail = be32_to_cpup(p); in decode_info()