/* Cache a reply. nfsd4_check_drc_limit() has bounded the cache size.  */
void nfsd4_store_cache_entry(struct nfsd4_compoundres *resp)
/* Cache a reply. nfsd4_check_drc_limit() has bounded the cache size.  */
void nfsd4_store_cache_entry(struct nfsd4_compoundres *resp)
{
	struct nfsd4_slot *slot = resp->cstate.slot;
	unsigned int base;
	dprintk("--> %s slot %p\n", __func__, slot);
	slot->sl_opcnt = resp->opcnt;
	slot->sl_status = resp->cstate.status;
	if (nfsd4_not_cached(resp)) {
		slot->sl_datalen = 0;
		return;
	}
	slot->sl_datalen = (char *)resp->p - (char *)resp->cstate.datap;
	base = (char *)resp->cstate.datap -
					(char *)resp->xbuf->head[0].iov_base;
	if (read_bytes_from_xdr_buf(resp->xbuf, base, slot->sl_data,
				    slot->sl_datalen))
		WARN("%s: sessions DRC could not cache compound\n", __func__);
	return;
}