summaryrefslogtreecommitdiff
path: root/ufs/pager.c
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1999-09-04 13:00:39 +0000
committerThomas Bushnell <thomas@gnu.org>1999-09-04 13:00:39 +0000
commit4deab46f5e6c5f209f85e66cfb62b95143033c41 (patch)
tree1064892a14c68884b82c8bab063d85f3ab35c168 /ufs/pager.c
parent176b24ab0535a80d697f915223538ea70d92c49c (diff)
1999-09-04 Thomas Bushnell, BSG <tb@mit.edu>
* pager.c (find_address): If !ISREAD, then don't return errors for access past NP->allocsize, and clear *ADDR and *DISKSIZE. These can happen through harmless races against truncate. (pager_write_page): Don't print annoying messages for writes to unallocated disk. These can happen through harmless races against truncate, and so we should not pester the console with them.
Diffstat (limited to 'ufs/pager.c')
-rw-r--r--ufs/pager.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/ufs/pager.c b/ufs/pager.c
index e703bfd2..3038932d 100644
--- a/ufs/pager.c
+++ b/ufs/pager.c
@@ -121,7 +121,14 @@ find_address (struct user_pager_info *upi,
{
if (*nplock)
rwlock_reader_unlock (*nplock);
- return EIO;
+ if (isread)
+ return EIO;
+ else
+ {
+ *addr = 0;
+ *disksize = 0;
+ return 0;
+ }
}
if (offset + __vm_page_size > np->allocsize)
@@ -216,13 +223,7 @@ pager_write_page (struct user_pager_info *pager,
err = EIO;
}
else
- {
- printf ("Attempt to write unallocated disk\n.");
- printf ("Object %p\tOffset %#x\n", pager, page);
- fflush (stdout);
- err = 0; /* unallocated disk;
- error would be pointless */
- }
+ err = 0;
if (nplock)
rwlock_reader_unlock (nplock);