Set fs_ronly to the correct value in ffs_reload() when reloading the file

system super block after fsck has repaired the file system.  The value of
fs_ronly was getting overwritten, which caused ffs_update() to attempt to
update inode timestamps even though the file system was still mounted
read-only.

This fixes the "giving up on N buffers" error that is triggered by running
fsck on the root file system and then rebooting without mounting the file
system read-write.
This commit is contained in:
Don Lewis 2003-12-07 05:16:52 +00:00
parent 5745b7c5af
commit 31c81e4bed

View File

@ -455,6 +455,8 @@ ffs_reload(mp, cred, td)
newfs->fs_maxcluster = fs->fs_maxcluster;
newfs->fs_contigdirs = fs->fs_contigdirs;
newfs->fs_active = fs->fs_active;
/* The file system is still read-only. */
newfs->fs_ronly = 1;
sblockloc = fs->fs_sblockloc;
bcopy(newfs, fs, (u_int)fs->fs_sbsize);
brelse(bp);