summaryrefslogtreecommitdiff
path: root/ufs/pager.c
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-04-23 18:08:24 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-04-23 18:08:24 +0000
commit31dc09b2735af50391ee6496d5fbc3b2763f9e9b (patch)
treed492a811fdcbe24d0dd6a9085ad12e9044238f20 /ufs/pager.c
parentd89ff895ad69dad913e69d6bf863035234e1fd7d (diff)
(pager_unlock_page): Use read/write_disk_entry when reading/writing
on-disk inode fields and indirect blocks.
Diffstat (limited to 'ufs/pager.c')
-rw-r--r--ufs/pager.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/ufs/pager.c b/ufs/pager.c
index 8834f911..d4bc87c5 100644
--- a/ufs/pager.c
+++ b/ufs/pager.c
@@ -246,7 +246,8 @@ pager_unlock_page (struct user_pager_info *pager,
assert (lblkno (sblock, address) < NDADDR);
diskfs_device_write_sync (fsbtodb (sblock, bno),
zeroblock, sblock->fs_bsize);
- indirs[0].bno = di->di_db[lblkno (sblock, address)] = bno;
+ indirs[0].bno = bno;
+ write_disk_entry (di->di_db[lblkno (sblock, address)], bno);
record_poke (di, sizeof (struct dinode));
}
else
@@ -266,7 +267,8 @@ pager_unlock_page (struct user_pager_info *pager,
if (err)
goto out;
zero_disk_block (bno);
- indirs[1].bno = di->di_ib[INDIR_SINGLE] = bno;
+ indirs[1].bno = bno;
+ write_disk_entry (di->di_ib[INDIR_SINGLE], bno);
record_poke (di, sizeof (struct dinode));
}
else
@@ -290,7 +292,8 @@ pager_unlock_page (struct user_pager_info *pager,
if (err)
goto out;
zero_disk_block (bno);
- indirs[2].bno = di->di_ib[INDIR_DOUBLE] = bno;
+ indirs[2].bno = bno;
+ write_disk_entry (di->di_ib[INDIR_DOUBLE], bno);
record_poke (di, sizeof (struct dinode));
}
@@ -306,7 +309,8 @@ pager_unlock_page (struct user_pager_info *pager,
if (err)
goto out;
zero_disk_block (bno);
- indirs[1].bno = diblock[indirs[1].offset] = bno;
+ indirs[1].bno = bno;
+ write_disk_entry (diblock[indirs[1].offset], bno);
record_poke (diblock, sblock->fs_bsize);
}
}
@@ -326,7 +330,8 @@ pager_unlock_page (struct user_pager_info *pager,
diskfs_device_write_sync (fsbtodb (sblock, bno),
zeroblock, sblock->fs_bsize);
- indirs[0].bno = siblock[indirs[0].offset] = bno;
+ indirs[0].bno = bno;
+ write_disk_entry (siblock[indirs[0].offset], bno);
record_poke (siblock, sblock->fs_bsize);
}
}