Lines Matching refs:resp

418 	struct nfsd_stat *resp = rqstp->rq_resp;  in nfssvc_encode_statres()  local
420 return svcxdr_encode_stat(xdr, resp->status); in nfssvc_encode_statres()
426 struct nfsd_attrstat *resp = rqstp->rq_resp; in nfssvc_encode_attrstatres() local
428 if (!svcxdr_encode_stat(xdr, resp->status)) in nfssvc_encode_attrstatres()
430 switch (resp->status) { in nfssvc_encode_attrstatres()
432 if (!svcxdr_encode_fattr(rqstp, xdr, &resp->fh, &resp->stat)) in nfssvc_encode_attrstatres()
443 struct nfsd_diropres *resp = rqstp->rq_resp; in nfssvc_encode_diropres() local
445 if (!svcxdr_encode_stat(xdr, resp->status)) in nfssvc_encode_diropres()
447 switch (resp->status) { in nfssvc_encode_diropres()
449 if (!svcxdr_encode_fhandle(xdr, &resp->fh)) in nfssvc_encode_diropres()
451 if (!svcxdr_encode_fattr(rqstp, xdr, &resp->fh, &resp->stat)) in nfssvc_encode_diropres()
462 struct nfsd_readlinkres *resp = rqstp->rq_resp; in nfssvc_encode_readlinkres() local
465 if (!svcxdr_encode_stat(xdr, resp->status)) in nfssvc_encode_readlinkres()
467 switch (resp->status) { in nfssvc_encode_readlinkres()
469 if (xdr_stream_encode_u32(xdr, resp->len) < 0) in nfssvc_encode_readlinkres()
471 xdr_write_pages(xdr, &resp->page, 0, resp->len); in nfssvc_encode_readlinkres()
472 if (svc_encode_result_payload(rqstp, head->iov_len, resp->len) < 0) in nfssvc_encode_readlinkres()
483 struct nfsd_readres *resp = rqstp->rq_resp; in nfssvc_encode_readres() local
486 if (!svcxdr_encode_stat(xdr, resp->status)) in nfssvc_encode_readres()
488 switch (resp->status) { in nfssvc_encode_readres()
490 if (!svcxdr_encode_fattr(rqstp, xdr, &resp->fh, &resp->stat)) in nfssvc_encode_readres()
492 if (xdr_stream_encode_u32(xdr, resp->count) < 0) in nfssvc_encode_readres()
494 xdr_write_pages(xdr, resp->pages, rqstp->rq_res.page_base, in nfssvc_encode_readres()
495 resp->count); in nfssvc_encode_readres()
496 if (svc_encode_result_payload(rqstp, head->iov_len, resp->count) < 0) in nfssvc_encode_readres()
507 struct nfsd_readdirres *resp = rqstp->rq_resp; in nfssvc_encode_readdirres() local
508 struct xdr_buf *dirlist = &resp->dirlist; in nfssvc_encode_readdirres()
510 if (!svcxdr_encode_stat(xdr, resp->status)) in nfssvc_encode_readdirres()
512 switch (resp->status) { in nfssvc_encode_readdirres()
518 if (xdr_stream_encode_bool(xdr, resp->common.err == nfserr_eof) < 0) in nfssvc_encode_readdirres()
529 struct nfsd_statfsres *resp = rqstp->rq_resp; in nfssvc_encode_statfsres() local
530 struct kstatfs *stat = &resp->stats; in nfssvc_encode_statfsres()
533 if (!svcxdr_encode_stat(xdr, resp->status)) in nfssvc_encode_statfsres()
535 switch (resp->status) { in nfssvc_encode_statfsres()
559 void nfssvc_encode_nfscookie(struct nfsd_readdirres *resp, u32 offset) in nfssvc_encode_nfscookie() argument
563 if (!resp->cookie_offset) in nfssvc_encode_nfscookie()
566 write_bytes_to_xdr_buf(&resp->dirlist, resp->cookie_offset, &cookie, in nfssvc_encode_nfscookie()
568 resp->cookie_offset = 0; in nfssvc_encode_nfscookie()
572 svcxdr_encode_entry_common(struct nfsd_readdirres *resp, const char *name, in svcxdr_encode_entry_common() argument
575 struct xdr_buf *dirlist = &resp->dirlist; in svcxdr_encode_entry_common()
576 struct xdr_stream *xdr = &resp->xdr; in svcxdr_encode_entry_common()
587 resp->cookie_offset = dirlist->len; in svcxdr_encode_entry_common()
616 struct nfsd_readdirres *resp = container_of(ccd, in nfssvc_encode_entry() local
619 unsigned int starting_length = resp->dirlist.len; in nfssvc_encode_entry()
622 nfssvc_encode_nfscookie(resp, offset); in nfssvc_encode_entry()
624 if (!svcxdr_encode_entry_common(resp, name, namlen, offset, ino)) in nfssvc_encode_entry()
627 xdr_commit_encode(&resp->xdr); in nfssvc_encode_entry()
628 resp->common.err = nfs_ok; in nfssvc_encode_entry()
632 resp->cookie_offset = 0; in nfssvc_encode_entry()
633 resp->common.err = nfserr_toosmall; in nfssvc_encode_entry()
634 resp->dirlist.len = starting_length; in nfssvc_encode_entry()
643 struct nfsd_attrstat *resp = rqstp->rq_resp; in nfssvc_release_attrstat() local
645 fh_put(&resp->fh); in nfssvc_release_attrstat()
650 struct nfsd_diropres *resp = rqstp->rq_resp; in nfssvc_release_diropres() local
652 fh_put(&resp->fh); in nfssvc_release_diropres()
657 struct nfsd_readres *resp = rqstp->rq_resp; in nfssvc_release_readres() local
659 fh_put(&resp->fh); in nfssvc_release_readres()