From ff5e15a487e7941c09e27fd4af9b962703391ed4 Mon Sep 17 00:00:00 2001 From: Andriy Gapon Date: Tue, 21 Sep 2010 05:54:36 +0000 Subject: [PATCH] zfs_vnops: use zfs_map_page/zfs_unmap_page helper functions in another place MFC after: 2 weeks --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c index 383832661f1e..935357214a0c 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c @@ -510,14 +510,11 @@ again: dirbytes = 0; } if (error == 0) { - sched_pin(); - sf = sf_buf_alloc(m, SFB_CPUPRIVATE); - va = (caddr_t)sf_buf_kva(sf); + va = zfs_map_page(m, &sf); error = dmu_read(os, zp->z_id, start + off, bytes, (void *)(va + off), DMU_READ_PREFETCH); - sf_buf_free(sf); - sched_unpin(); + zfs_unmap_page(sf); } VM_OBJECT_LOCK(obj); if (error == 0)