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:
iedowse 2001-02-03 21:25:32 +00:00
parent c99e253f39
commit d8f5df1f3b

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");
}