Move rtvals initialization out of the region protected by NFS node

lock.

Noted by:	alc
Reviewed by:	alc, markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
X-Differential revision:	https://reviews.freebsd.org/D11697
This commit is contained in:
Konstantin Belousov 2017-07-26 20:01:31 +00:00
parent ce793a529b
commit cc2c26223b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=321580

View File

@ -306,10 +306,6 @@ ncl_putpages(struct vop_putpages_args *ap)
printf("ncl_putpages: called on noncache-able vnode\n");
mtx_lock(&np->n_mtx);
}
for (i = 0; i < npages; i++)
rtvals[i] = VM_PAGER_ERROR;
/*
* When putting pages, do not extend file past EOF.
*/
@ -320,6 +316,9 @@ ncl_putpages(struct vop_putpages_args *ap)
}
mtx_unlock(&np->n_mtx);
for (i = 0; i < npages; i++)
rtvals[i] = VM_PAGER_ERROR;
VM_CNT_INC(v_vnodeout);
VM_CNT_ADD(v_vnodepgsout, count);