View | Details | Raw Unified | Return to bug 260293
Collapse All | Expand All

(-)sys/fs/nfsserver/nfs_nfsdstate.c (-1 / +12 lines)
Lines 6994-7007 nfsrv_flexlayouterr(struct nfsrv_descript *nd, uint32_ Link Here
6994
	char devid[NFSX_V4DEVICEID];
6994
	char devid[NFSX_V4DEVICEID];
6995
6995
6996
	tl = layp;
6996
	tl = layp;
6997
	cnt = fxdr_unsigned(int, *tl++);
6997
	maxcnt -= NFSX_UNSIGNED;
6998
	if (maxcnt > 0)
6999
		cnt = fxdr_unsigned(int, *tl++);
7000
	else
7001
		cnt = 0;
6998
	NFSD_DEBUG(4, "flexlayouterr cnt=%d\n", cnt);
7002
	NFSD_DEBUG(4, "flexlayouterr cnt=%d\n", cnt);
6999
	for (i = 0; i < cnt; i++) {
7003
	for (i = 0; i < cnt; i++) {
7004
		maxcnt -= NFSX_STATEID + 2 * NFSX_HYPER +
7005
		    NFSX_UNSIGNED;
7006
		if (maxcnt <= 0)
7007
			break;
7000
		/* Skip offset, length and stateid for now. */
7008
		/* Skip offset, length and stateid for now. */
7001
		tl += (4 + NFSX_STATEID / NFSX_UNSIGNED);
7009
		tl += (4 + NFSX_STATEID / NFSX_UNSIGNED);
7002
		errcnt = fxdr_unsigned(int, *tl++);
7010
		errcnt = fxdr_unsigned(int, *tl++);
7003
		NFSD_DEBUG(4, "flexlayouterr errcnt=%d\n", errcnt);
7011
		NFSD_DEBUG(4, "flexlayouterr errcnt=%d\n", errcnt);
7004
		for (j = 0; j < errcnt; j++) {
7012
		for (j = 0; j < errcnt; j++) {
7013
			maxcnt -= NFSX_V4DEVICEID + 2 * NFSX_UNSIGNED;
7014
			if (maxcnt < 0)
7015
				break;
7005
			NFSBCOPY(tl, devid, NFSX_V4DEVICEID);
7016
			NFSBCOPY(tl, devid, NFSX_V4DEVICEID);
7006
			tl += (NFSX_V4DEVICEID / NFSX_UNSIGNED);
7017
			tl += (NFSX_V4DEVICEID / NFSX_UNSIGNED);
7007
			stat = fxdr_unsigned(int, *tl++);
7018
			stat = fxdr_unsigned(int, *tl++);

Return to bug 260293