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:
parent
eec075cac9
commit
f434e08437
@ -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");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user