diff options
author | Pedro Martelletto <pedro@cvs.openbsd.org> | 2006-04-05 12:59:21 +0000 |
---|---|---|
committer | Pedro Martelletto <pedro@cvs.openbsd.org> | 2006-04-05 12:59:21 +0000 |
commit | 5b2ce8ac9a3d32cda580be7bd486d9c20e54fcf2 (patch) | |
tree | 6e7b4ffabbf07cad47b12bd600162114ddc530b1 /sys/ufs/ffs/ffs_inode.c | |
parent | 267d6bc9006244916fa38f2897d20adb3a499e9d (diff) |
Teach ffs_update() how to update FFS2 inodes
Diffstat (limited to 'sys/ufs/ffs/ffs_inode.c')
-rw-r--r-- | sys/ufs/ffs/ffs_inode.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c index c6b647e599d..0adf44612df 100644 --- a/sys/ufs/ffs/ffs_inode.c +++ b/sys/ufs/ffs/ffs_inode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_inode.c,v 1.43 2006/04/05 12:55:53 pedro Exp $ */ +/* $OpenBSD: ffs_inode.c,v 1.44 2006/04/05 12:59:20 pedro Exp $ */ /* $NetBSD: ffs_inode.c,v 1.10 1996/05/11 18:27:19 mycroft Exp $ */ /* @@ -134,8 +134,15 @@ ffs_update(struct inode *ip, struct timespec *atime, else if (ip->i_effnlink != DIP(ip, nlink)) panic("ffs_update: bad link cnt"); - *((struct ufs1_dinode *)bp->b_data + - ino_to_fsbo(fs, ip->i_number)) = *ip->i_din1; +#ifdef FFS2 + if (ip->i_ump->um_fstype == UM_UFS2) + *((struct ufs2_dinode *)bp->b_data + + ino_to_fsbo(fs, ip->i_number)) = *ip->i_din2; + else +#endif + *((struct ufs1_dinode *)bp->b_data + + ino_to_fsbo(fs, ip->i_number)) = *ip->i_din1; + if (waitfor && !DOINGASYNC(vp)) { return (bwrite(bp)); } else { |