Project

General

Profile

Bug #6554 » nfssrv.patch

Marcel Telka, 2016-01-14 03:26 PM

View differences:

usr/src/uts/common/fs/nfs/nfs4_srv.c
3162 3162
	return (error);
3163 3163
}
3164 3164

  
3165
volatile int rfs4_op_read_wait = 0;
3166

  
3165 3167
/* ARGSUSED */
3166 3168
static void
3167 3169
rfs4_op_read(nfs_argop4 *argop, nfs_resop4 *resop, struct svc_req *req,
......
3218 3220
			*cs->statusp = resp->status = NFS4ERR_LOCKED;
3219 3221
			goto out;
3220 3222
		}
3223
		rfs4_op_read_wait = 1;
3224
		while (rfs4_op_read_wait != 0)
3225
			delay(500 * drv_usectohz(1000));
3221 3226
	}
3222 3227

  
3223 3228
	if ((stat = rfs4_check_stateid(FREAD, vp, &args->stateid, FALSE,
......
8825 8830
	else if (length == (length4)(~0))
8826 8831
		length = 0;		/* Posix to end of file  */
8827 8832

  
8833
	while (rfs4_op_read_wait == 0)
8834
		delay(500 * drv_usectohz(1000));
8828 8835
retry:
8829 8836
	rfs4_dbe_lock(sp->rs_dbe);
8837
	rfs4_op_read_wait = 0;
8830 8838
	if (sp->rs_closed) {
8831 8839
		rfs4_dbe_unlock(sp->rs_dbe);
8832 8840
		return (NFS4ERR_OLD_STATEID);
(1-1/2)