dprintk("%s: short packet at entry %d\n", __FUNCTION__, nr); 
static int decode_readdir(struct xdr_stream *xdr, struct rpc_rqst *req, struct nfs4_readdir_res *readdir){	struct xdr_buf	*rcvbuf = &req->rq_rcv_buf;	struct page	*page = *rcvbuf->pages;	struct kvec	*iov = rcvbuf->head;	unsigned int	nr, pglen = rcvbuf->page_len;	uint32_t	*end, *entry, *p, *kaddr;	uint32_t	len, attrlen;	int 		hdrlen, recvd, status;	status = decode_op_hdr(xdr, OP_READDIR);	if (status)		return status;	READ_BUF(8);	COPYMEM(readdir->verifier.data, 8);	hdrlen = (char *) p - (char *) iov->iov_base;	recvd = rcvbuf->len - hdrlen;	if (pglen > recvd)		pglen = recvd;	xdr_read_pages(xdr, pglen);	BUG_ON(pglen + readdir->pgbase > PAGE_CACHE_SIZE);	kaddr = p = (uint32_t *) kmap_atomic(page, KM_USER0);	end = (uint32_t *) ((char *)p + pglen + readdir->pgbase);	entry = p;	for (nr = 0; *p++; nr++) {		if (p + 3 > end)			goto short_pkt;		p += 2;			/* cookie */		len = ntohl(*p++);	/* filename length */		if (len > NFS4_MAXNAMLEN) {			printk(KERN_WARNING "NFS: giant filename in readdir (len 0x%x)\n", len);			goto err_unmap;		}		p += XDR_QUADLEN(len);		if (p + 1 > end)			goto short_pkt;		len = ntohl(*p++);	/* bitmap length */		p += len;		if (p + 1 > end)			goto short_pkt;		attrlen = XDR_QUADLEN(ntohl(*p++));		p += attrlen;		/* attributes */		if (p + 2 > end)			goto short_pkt;		entry = p;	}	if (!nr && (entry[0] != 0 || entry[1] == 0))		goto short_pkt;out:		kunmap_atomic(kaddr, KM_USER0);	return 0;short_pkt:	entry[0] = entry[1] = 0;	/* truncate listing ? */	if (!nr) {		printk(KERN_NOTICE "NFS: readdir reply truncated!\n");		entry[1] = 1;	}	goto out;err_unmap:	kunmap_atomic(kaddr, KM_USER0);	return -errno_NFSERR_IO;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/eadf4598e7ec37a234e70e965bd335860e58bda4/nfs4xdr.c/clean/fs/nfs/nfs4xdr.c