diff options
author | Miles Bader <miles@gnu.org> | 1995-05-11 16:45:56 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1995-05-11 16:45:56 +0000 |
commit | 8bea1252bcdd4b6529206cac45601a430aa43d70 (patch) | |
tree | 8c9723adc3b06685a229cb6c627c729f3faf57e4 | |
parent | d48fc8d01f4524b9e8d6810d54176496cdb6ec6d (diff) |
(_pager_mark_next_request_error, _pager_mark_object_error): Put the error
code in the correct place in the pagemap rather than always at the beginning.
(pager_get_error): Get the error code from the pagemap rather than just using
the pagemap offset!
-rw-r--r-- | libpager/mark-error.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libpager/mark-error.c b/libpager/mark-error.c index 348a7c7c..411d3a7d 100644 --- a/libpager/mark-error.c +++ b/libpager/mark-error.c @@ -54,7 +54,7 @@ _pager_mark_next_request_error(struct pager *pager, break; } - for (p = pager->pagemap; p < pager->pagemap + length; p++) + for (p = pager->pagemap + offset; p < pager->pagemap + offset + length; p++) *p = SET_PM_NEXTERROR (*p, page_error); } @@ -92,7 +92,7 @@ _pager_mark_object_error(struct pager *pager, break; } - for (p = pager->pagemap; p < pager->pagemap + length; p++) + for (p = pager->pagemap + offset; p < pager->pagemap + offset + length; p++) *p = SET_PM_ERROR (*p, page_error); } @@ -107,9 +107,8 @@ pager_get_error (struct pager *p, mutex_lock (&p->interlock); _pager_pagemap_resize (p, addr); - err = _pager_page_errors[PM_ERROR(addr/__vm_page_size)]; + err = _pager_page_errors[PM_ERROR(p->pagemap[addr/__vm_page_size])]; mutex_unlock (&p->interlock); return err; } - |