diff options
author | Sergey Bugaev <bugaevc@gmail.com> | 2021-05-08 18:31:41 +0300 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2021-05-08 20:32:55 +0200 |
commit | 4f79dd28d714dbaf225ac5062ca1f2527567a81d (patch) | |
tree | 0d782f954d030a518bafc13cd35ed27585e2fd80 /storeio | |
parent | ff88e4aa1d70f2ef218080daf01282f38243d914 (diff) | |
download | hurd-4f79dd28d714dbaf225ac5062ca1f2527567a81d.tar.gz hurd-4f79dd28d714dbaf225ac5062ca1f2527567a81d.tar.bz2 hurd-4f79dd28d714dbaf225ac5062ca1f2527567a81d.zip |
libpager: pager_write_page () should not unmap page
Clarify this in the documentation, and fix the storeio implementation.
Message-Id: <20210508153144.332832-2-bugaevc@gmail.com>
Diffstat (limited to 'storeio')
-rw-r--r-- | storeio/pager.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/storeio/pager.c b/storeio/pager.c index 12387939..01a1525c 100644 --- a/storeio/pager.c +++ b/storeio/pager.c @@ -66,9 +66,9 @@ pager_read_page (struct user_pager_info *upi, return 0; } -/* For pager PAGER, synchronously write one page from BUF to offset PAGE. In - addition, vm_deallocate (or equivalent) BUF. The only permissible error - returns are EIO, EDQUOT, and ENOSPC. */ +/* For pager PAGER, synchronously write one page from BUF to offset PAGE. + Do not deallocate BUF, and do not keep any references to BUF. The only + permissible error returns are EIO, EDQUOT, and ENOSPC. */ error_t pager_write_page (struct user_pager_info *upi, vm_offset_t page, vm_address_t buf) @@ -90,8 +90,6 @@ pager_write_page (struct user_pager_info *upi, err = dev_write (dev, page, (char *)buf, want, &written); - munmap ((caddr_t) buf, vm_page_size); - if (err || written < want) return EIO; else |