Print this page
5382 pvn_getpages handles lengths <= PAGESIZE just fine
@@ -28,10 +28,11 @@
* All rights reserved.
*/
/*
* Copyright (c) 2013, Joyent, Inc. All rights reserved.
+ * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
*/
#include <sys/param.h>
#include <sys/types.h>
#include <sys/systm.h>
@@ -4583,17 +4584,12 @@
return (EFAULT); /* beyond EOF */
}
mutex_exit(&rp->r_statelock);
- if (len <= PAGESIZE) {
- error = nfs3_getapage(vp, off, len, protp, pl, plsz,
- seg, addr, rw, cr);
- } else {
error = pvn_getpages(nfs3_getapage, vp, off, len, protp,
pl, plsz, seg, addr, rw, cr);
- }
switch (error) {
case NFS_EOF:
nfs_purge_caches(vp, NFS_NOPURGE_DNLC, cr);
goto retry;
@@ -4603,11 +4599,11 @@
return (error);
}
/*
- * Called from pvn_getpages or nfs3_getpage to get a particular page.
+ * Called from pvn_getpages to get a particular page.
*/
/* ARGSUSED */
static int
nfs3_getapage(vnode_t *vp, u_offset_t off, size_t len, uint_t *protp,
page_t *pl[], size_t plsz, struct seg *seg, caddr_t addr,