Use the correct flags field when checking for a read-only filesystem

in ufs_dirbad(). The mnt_stat.f_flags field is only updated by the
syscalls *statfs and getfsstat, so mnt_flag should be used instead.

This only affects whether or not a panic is generated on detection of
certain types of directory corruption.

Reviewed by:	mckusick
This commit is contained in:
Ian Dowse 2001-02-03 21:25:32 +00:00
parent eec075cac9
commit f434e08437

View File

@ -591,7 +591,7 @@ ufs_dirbad(ip, offset, how)
mp = ITOV(ip)->v_mount;
(void)printf("%s: bad dir ino %lu at offset %ld: %s\n",
mp->mnt_stat.f_mntonname, (u_long)ip->i_number, (long)offset, how);
if ((mp->mnt_stat.f_flags & MNT_RDONLY) == 0)
if ((mp->mnt_flag & MNT_RDONLY) == 0)
panic("ufs_dirbad: bad dir");
}