From f434e08437b93667910176f142fcefaa9bba077f Mon Sep 17 00:00:00 2001 From: Ian Dowse Date: Sat, 3 Feb 2001 21:25:32 +0000 Subject: [PATCH] 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 --- sys/ufs/ufs/ufs_lookup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c index 13964842b564..a403e689ce38 100644 --- a/sys/ufs/ufs/ufs_lookup.c +++ b/sys/ufs/ufs/ufs_lookup.c @@ -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"); }