Merge memstat_uma.c:1.15 from HEAD to RELENG_6:

When reporting an error reading from UMA per-cpu cache pointers using KVM,
  return a KVM error rather than an out of memory error, so that the caller
  reports the KVM error state.  This replaces a misleading error message
  with a more accurate although equally confusing one.

Approved by:	re (scottl)
This commit is contained in:
rwatson 2006-02-14 03:36:21 +00:00
parent 8a6e1d37f3
commit dfedbdbb8a

View File

@ -397,8 +397,7 @@ memstat_kvm_uma(struct memory_type_list *list, void *kvm_handle)
&ub, sizeof(ub), 0);
if (ret != 0) {
_memstat_mtl_empty(list);
list->mtl_error =
MEMSTAT_ERROR_NOMEMORY;
list->mtl_error = ret;
return (-1);
}
mtp->mt_free += ub.ub_cnt;
@ -408,8 +407,7 @@ memstat_kvm_uma(struct memory_type_list *list, void *kvm_handle)
&ub, sizeof(ub), 0);
if (ret != 0) {
_memstat_mtl_empty(list);
list->mtl_error =
MEMSTAT_ERROR_NOMEMORY;
list->mtl_error = ret;
return (-1);
}
mtp->mt_free += ub.ub_cnt;