diff options
author | jeff <jeff@FreeBSD.org> | 2002-08-04 10:29:36 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2002-08-04 10:29:36 +0000 |
commit | 02517b6731ab2da44ce9b49260429744cf0114d5 (patch) | |
tree | e889f56910bf98cbee3be239655a9e4bbb928b2e /sys/kern/vfs_extattr.c | |
parent | a03ca02ee99a255a2c14a75ff8eb488960b13ea7 (diff) | |
download | FreeBSD-src-02517b6731ab2da44ce9b49260429744cf0114d5.zip FreeBSD-src-02517b6731ab2da44ce9b49260429744cf0114d5.tar.gz |
- Replace v_flag with v_iflag and v_vflag
- v_vflag is protected by the vnode lock and is used when synchronization
with VOP calls is needed.
- v_iflag is protected by interlock and is used for dealing with vnode
management issues. These flags include X/O LOCK, FREE, DOOMED, etc.
- All accesses to v_iflag and v_vflag have either been locked or marked with
mp_fixme's.
- Many ASSERT_VOP_LOCKED calls have been added where the locking was not
clear.
- Many functions in vfs_subr.c were restructured to provide for stronger
locking.
Idea stolen from: BSD/OS
Diffstat (limited to 'sys/kern/vfs_extattr.c')
-rw-r--r-- | sys/kern/vfs_extattr.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index f02f62f..197829b 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -1155,7 +1155,8 @@ restart: * * XXX: can this only be a VDIR case? */ - if (vp->v_flag & VROOT) + mp_fixme("Accessing vflags w/o the vn lock."); + if (vp->v_vflag & VV_ROOT) error = EBUSY; } if (vn_start_write(nd.ni_dvp, &mp, V_NOWAIT) != 0) { @@ -2778,7 +2779,7 @@ restart: /* * The root of a mounted filesystem cannot be deleted. */ - if (vp->v_flag & VROOT) { + if (vp->v_vflag & VV_ROOT) { error = EBUSY; goto out; } @@ -2939,7 +2940,8 @@ unionread: return (error); } } - if ((vp->v_flag & VROOT) && + mp_fixme("Accessing vflags w/o vn lock."); + if ((vp->v_vflag & VV_ROOT) && (vp->v_mount->mnt_flag & MNT_UNION)) { struct vnode *tvp = vp; vp = vp->v_mount->mnt_vnodecovered; @@ -3030,7 +3032,8 @@ unionread: return (error); } } - if ((vp->v_flag & VROOT) && + mp_fixme("Accessing vflag without vn lock."); + if ((vp->v_vflag & VV_ROOT) && (vp->v_mount->mnt_flag & MNT_UNION)) { struct vnode *tvp = vp; vp = vp->v_mount->mnt_vnodecovered; |