summaryrefslogtreecommitdiff
path: root/sys/ufs/ffs
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2020-02-21 11:11:16 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2020-02-21 11:11:16 +0000
commit002067cac9d73040f35582a57d200d7479a4f86d (patch)
tree87b2b4b0d28a53afc4d30b5f2210bae48b66cd37 /sys/ufs/ffs
parent44f18b94170cd98c42626b69d8362d0e13a638ab (diff)
Handle the mount(... MNT_RELOAD) case for ffs2 as well. ok kettenis@
Diffstat (limited to 'sys/ufs/ffs')
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 201ccdacb50..453111b39dd 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_vfsops.c,v 1.182 2019/12/26 13:28:49 bluhm Exp $ */
+/* $OpenBSD: ffs_vfsops.c,v 1.183 2020/02/21 11:11:15 otto Exp $ */
/* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */
/*
@@ -533,8 +533,14 @@ ffs_reload_vnode(struct vnode *vp, void *args)
return (error);
}
- *ip->i_din1 = *((struct ufs1_dinode *)bp->b_data +
- ino_to_fsbo(fra->fs, ip->i_number));
+ if (fra->fs->fs_magic == FS_UFS1_MAGIC)
+ *ip->i_din1 = *((struct ufs1_dinode *)bp->b_data +
+ ino_to_fsbo(fra->fs, ip->i_number));
+#ifdef FFS2
+ else
+ *ip->i_din2 = *((struct ufs2_dinode *)bp->b_data +
+ ino_to_fsbo(fra->fs, ip->i_number));
+#endif /* FFS2 */
ip->i_effnlink = DIP(ip, nlink);
brelse(bp);
vput(vp);