diff options
author | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 1997-11-06 05:59:40 +0000 |
---|---|---|
committer | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 1997-11-06 05:59:40 +0000 |
commit | 4e165724f1631d1deee6fd89b941fabdbcc855d4 (patch) | |
tree | 3aca36af68e90377984b00e9f0050674b0763db5 /sys/ufs/lfs | |
parent | fec1be888534eb37405f6bf7a195f28670e1392b (diff) |
Updates for VFS Lite 2 + soft update.
Diffstat (limited to 'sys/ufs/lfs')
-rw-r--r-- | sys/ufs/lfs/lfs_segment.c | 6 | ||||
-rw-r--r-- | sys/ufs/lfs/lfs_vfsops.c | 15 |
2 files changed, 10 insertions, 11 deletions
diff --git a/sys/ufs/lfs/lfs_segment.c b/sys/ufs/lfs/lfs_segment.c index 8643999f722..40a534614c5 100644 --- a/sys/ufs/lfs/lfs_segment.c +++ b/sys/ufs/lfs/lfs_segment.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lfs_segment.c,v 1.6 1997/05/30 08:34:42 downsj Exp $ */ +/* $OpenBSD: lfs_segment.c,v 1.7 1997/11/06 05:59:22 csapuntz Exp $ */ /* $NetBSD: lfs_segment.c,v 1.4 1996/02/09 22:28:54 christos Exp $ */ /* @@ -303,7 +303,7 @@ lfs_segwrite(mp, flags) if (do_ckp || fs->lfs_doifile) { redo: vp = fs->lfs_ivnode; - while (vget(vp, 1)); + while (vget(vp, LK_EXCLUSIVE, p)); ip = VTOI(vp); if (vp->v_dirtyblkhd.lh_first != NULL) lfs_writefile(fs, sp, vp); @@ -1145,7 +1145,7 @@ lfs_vref(vp) if (vp->v_flag & VXLOCK) /* XXX */ return(1); - return (vget(vp, 0)); + return (vget(vp, 0, p)); } void diff --git a/sys/ufs/lfs/lfs_vfsops.c b/sys/ufs/lfs/lfs_vfsops.c index 01313a89a97..c8e1da4a5ef 100644 --- a/sys/ufs/lfs/lfs_vfsops.c +++ b/sys/ufs/lfs/lfs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lfs_vfsops.c,v 1.8 1997/06/20 14:04:33 kstailey Exp $ */ +/* $OpenBSD: lfs_vfsops.c,v 1.9 1997/11/06 05:59:22 csapuntz Exp $ */ /* $NetBSD: lfs_vfsops.c,v 1.11 1996/03/25 12:53:35 pk Exp $ */ /* @@ -65,7 +65,6 @@ int lfs_mountfs __P((struct vnode *, struct mount *, struct proc *)); struct vfsops lfs_vfsops = { - MOUNT_LFS, lfs_mount, ufs_start, lfs_unmount, @@ -127,14 +126,14 @@ lfs_mount(mp, path, data, ndp, p) * that user has necessary permissions on the device. */ if (p->p_ucred->cr_uid != 0) { - VOP_LOCK(ump->um_devvp); + vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY, p); error = VOP_ACCESS(ump->um_devvp, VREAD|VWRITE, p->p_ucred, p); if (error) { - VOP_UNLOCK(ump->um_devvp); + VOP_UNLOCK(ump->um_devvp, 0, p); return (error); } - VOP_UNLOCK(ump->um_devvp); + VOP_UNLOCK(ump->um_devvp, 0, p); } fs->lfs_ronly = 0; } @@ -169,13 +168,13 @@ lfs_mount(mp, path, data, ndp, p) accessmode = VREAD; if ((mp->mnt_flag & MNT_RDONLY) == 0) accessmode |= VWRITE; - VOP_LOCK(devvp); + vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p); error = VOP_ACCESS(devvp, accessmode, p->p_ucred, p); if (error) { vput(devvp); return (error); } - VOP_UNLOCK(devvp); + VOP_UNLOCK(devvp, 0, p); } if ((mp->mnt_flag & MNT_UPDATE) == 0) error = lfs_mountfs(devvp, mp, p); /* LFS */ @@ -433,7 +432,7 @@ lfs_statfs(mp, sbp, p) bcopy(mp->mnt_stat.f_mntonname, sbp->f_mntonname, MNAMELEN); bcopy(mp->mnt_stat.f_mntfromname, sbp->f_mntfromname, MNAMELEN); } - strncpy(sbp->f_fstypename, mp->mnt_op->vfs_name, MFSNAMELEN); + strncpy(sbp->f_fstypename, mp->mnt_vfc->vfc_name, MFSNAMELEN); return (0); } |