Lines Matching refs:resp
431 struct nfsd_stat *resp = rqstp->rq_resp; in nfssvc_encode_statres() local
433 return svcxdr_encode_stat(xdr, resp->status); in nfssvc_encode_statres()
440 struct nfsd_attrstat *resp = rqstp->rq_resp; in nfssvc_encode_attrstatres() local
442 if (!svcxdr_encode_stat(xdr, resp->status)) in nfssvc_encode_attrstatres()
444 switch (resp->status) { in nfssvc_encode_attrstatres()
446 if (!svcxdr_encode_fattr(rqstp, xdr, &resp->fh, &resp->stat)) in nfssvc_encode_attrstatres()
458 struct nfsd_diropres *resp = rqstp->rq_resp; in nfssvc_encode_diropres() local
460 if (!svcxdr_encode_stat(xdr, resp->status)) in nfssvc_encode_diropres()
462 switch (resp->status) { in nfssvc_encode_diropres()
464 if (!svcxdr_encode_fhandle(xdr, &resp->fh)) in nfssvc_encode_diropres()
466 if (!svcxdr_encode_fattr(rqstp, xdr, &resp->fh, &resp->stat)) in nfssvc_encode_diropres()
478 struct nfsd_readlinkres *resp = rqstp->rq_resp; in nfssvc_encode_readlinkres() local
481 if (!svcxdr_encode_stat(xdr, resp->status)) in nfssvc_encode_readlinkres()
483 switch (resp->status) { in nfssvc_encode_readlinkres()
485 if (xdr_stream_encode_u32(xdr, resp->len) < 0) in nfssvc_encode_readlinkres()
487 xdr_write_pages(xdr, &resp->page, 0, resp->len); in nfssvc_encode_readlinkres()
488 if (svc_encode_result_payload(rqstp, head->iov_len, resp->len) < 0) in nfssvc_encode_readlinkres()
500 struct nfsd_readres *resp = rqstp->rq_resp; in nfssvc_encode_readres() local
503 if (!svcxdr_encode_stat(xdr, resp->status)) in nfssvc_encode_readres()
505 switch (resp->status) { in nfssvc_encode_readres()
507 if (!svcxdr_encode_fattr(rqstp, xdr, &resp->fh, &resp->stat)) in nfssvc_encode_readres()
509 if (xdr_stream_encode_u32(xdr, resp->count) < 0) in nfssvc_encode_readres()
511 xdr_write_pages(xdr, resp->pages, rqstp->rq_res.page_base, in nfssvc_encode_readres()
512 resp->count); in nfssvc_encode_readres()
513 if (svc_encode_result_payload(rqstp, head->iov_len, resp->count) < 0) in nfssvc_encode_readres()
525 struct nfsd_readdirres *resp = rqstp->rq_resp; in nfssvc_encode_readdirres() local
526 struct xdr_buf *dirlist = &resp->dirlist; in nfssvc_encode_readdirres()
528 if (!svcxdr_encode_stat(xdr, resp->status)) in nfssvc_encode_readdirres()
530 switch (resp->status) { in nfssvc_encode_readdirres()
536 if (xdr_stream_encode_bool(xdr, resp->common.err == nfserr_eof) < 0) in nfssvc_encode_readdirres()
548 struct nfsd_statfsres *resp = rqstp->rq_resp; in nfssvc_encode_statfsres() local
549 struct kstatfs *stat = &resp->stats; in nfssvc_encode_statfsres()
551 if (!svcxdr_encode_stat(xdr, resp->status)) in nfssvc_encode_statfsres()
553 switch (resp->status) { in nfssvc_encode_statfsres()
577 void nfssvc_encode_nfscookie(struct nfsd_readdirres *resp, u32 offset) in nfssvc_encode_nfscookie() argument
581 if (!resp->cookie_offset) in nfssvc_encode_nfscookie()
584 write_bytes_to_xdr_buf(&resp->dirlist, resp->cookie_offset, &cookie, in nfssvc_encode_nfscookie()
586 resp->cookie_offset = 0; in nfssvc_encode_nfscookie()
590 svcxdr_encode_entry_common(struct nfsd_readdirres *resp, const char *name, in svcxdr_encode_entry_common() argument
593 struct xdr_buf *dirlist = &resp->dirlist; in svcxdr_encode_entry_common()
594 struct xdr_stream *xdr = &resp->xdr; in svcxdr_encode_entry_common()
605 resp->cookie_offset = dirlist->len; in svcxdr_encode_entry_common()
634 struct nfsd_readdirres *resp = container_of(ccd, in nfssvc_encode_entry() local
637 unsigned int starting_length = resp->dirlist.len; in nfssvc_encode_entry()
640 nfssvc_encode_nfscookie(resp, offset); in nfssvc_encode_entry()
642 if (!svcxdr_encode_entry_common(resp, name, namlen, offset, ino)) in nfssvc_encode_entry()
645 xdr_commit_encode(&resp->xdr); in nfssvc_encode_entry()
646 resp->common.err = nfs_ok; in nfssvc_encode_entry()
650 resp->cookie_offset = 0; in nfssvc_encode_entry()
651 resp->common.err = nfserr_toosmall; in nfssvc_encode_entry()
652 resp->dirlist.len = starting_length; in nfssvc_encode_entry()
661 struct nfsd_attrstat *resp = rqstp->rq_resp; in nfssvc_release_attrstat() local
663 fh_put(&resp->fh); in nfssvc_release_attrstat()
668 struct nfsd_diropres *resp = rqstp->rq_resp; in nfssvc_release_diropres() local
670 fh_put(&resp->fh); in nfssvc_release_diropres()
675 struct nfsd_readres *resp = rqstp->rq_resp; in nfssvc_release_readres() local
677 fh_put(&resp->fh); in nfssvc_release_readres()