diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2017-07-26 20:01:31 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2017-07-26 20:01:31 +0000 |
commit | cc2c26223b6e9c5a5005b58d0df4d36a2b04eed3 (patch) | |
tree | 511068de73a29c5cfe4ba649901392e9ca93b321 /sys/fs/nfsclient/nfs_clbio.c | |
parent | ce793a529ba31c92ae276e7877ac76a6638f6393 (diff) | |
download | src-cc2c26223b6e9c5a5005b58d0df4d36a2b04eed3.tar.gz src-cc2c26223b6e9c5a5005b58d0df4d36a2b04eed3.zip |
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
Notes
Notes:
svn path=/head/; revision=321580
Diffstat (limited to 'sys/fs/nfsclient/nfs_clbio.c')
-rw-r--r-- | sys/fs/nfsclient/nfs_clbio.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c index 2b22ef9bdf3d..07d456a5465a 100644 --- a/sys/fs/nfsclient/nfs_clbio.c +++ b/sys/fs/nfsclient/nfs_clbio.c @@ -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); |