From 6fcf6199a4a9aefe9f2e59d947f0e0df171367b5 Mon Sep 17 00:00:00 2001 From: bdrewery Date: Sat, 22 Mar 2014 10:26:09 +0000 Subject: Rename global cnt to vm_cnt to avoid shadowing. To reduce the diff struct pcu.cnt field was not renamed, so PCPU_OP(cnt.field) is still used. pc_cnt and pcpu are also used in kvm(3) and vmstat(8). The goal was to not affect externally used KPI. Bump __FreeBSD_version_ in case some out-of-tree module/code relies on the the global cnt variable. Exp-run revealed no ports using it directly. No objection from: arch@ Sponsored by: EMC / Isilon Storage Division --- sys/ofed/drivers/infiniband/core/umem.c | 2 +- sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/ofed') diff --git a/sys/ofed/drivers/infiniband/core/umem.c b/sys/ofed/drivers/infiniband/core/umem.c index 9d7640e..7695a21 100644 --- a/sys/ofed/drivers/infiniband/core/umem.c +++ b/sys/ofed/drivers/infiniband/core/umem.c @@ -347,7 +347,7 @@ out: return ERR_PTR(-ENOMEM); } PROC_UNLOCK(proc); - if (npages + cnt.v_wire_count > vm_page_max_wired) { + if (npages + vm_cnt.v_wire_count > vm_page_max_wired) { kfree(umem); return ERR_PTR(-EAGAIN); } diff --git a/sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.c b/sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.c index ab139bf..cc5c867 100644 --- a/sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.c +++ b/sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.c @@ -559,7 +559,7 @@ out: goto out; } PROC_UNLOCK(proc); - if (cnt.v_wire_count + 1 > vm_page_max_wired) { + if (vm_cnt.v_wire_count + 1 > vm_page_max_wired) { ret = -EAGAIN; goto out; } -- cgit v1.1