summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2005-01-24 13:13:57 +0000
committerphk <phk@FreeBSD.org>2005-01-24 13:13:57 +0000
commitd5c135375c366bd87eec9c632eece3157076af35 (patch)
treeeb53492bafcbb3035fc103f1e90294f46ac8ac7a /sys
parente5b74a2850fcb72f8b86a8034c494dc10c45982d (diff)
downloadFreeBSD-src-d5c135375c366bd87eec9c632eece3157076af35.zip
FreeBSD-src-d5c135375c366bd87eec9c632eece3157076af35.tar.gz
Kill the VV_OBJBUF and test the v_object for NULL instead.
Diffstat (limited to 'sys')
-rw-r--r--sys/fs/nullfs/null_vnops.c3
-rw-r--r--sys/fs/unionfs/union_vnops.c4
-rw-r--r--sys/kern/vfs_bio.c7
-rw-r--r--sys/kern/vfs_default.c3
-rw-r--r--sys/kern/vfs_subr.c2
-rw-r--r--sys/sys/vnode.h1
-rw-r--r--sys/vm/vnode_pager.c2
7 files changed, 7 insertions, 15 deletions
diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c
index 44d9226..a85ebe0 100644
--- a/sys/fs/nullfs/null_vnops.c
+++ b/sys/fs/nullfs/null_vnops.c
@@ -740,7 +740,6 @@ null_createvobject(struct vop_createvobject_args *ap)
error = VOP_CREATEVOBJECT(lowervp, ap->a_cred, ap->a_td);
if (error)
return (error);
- vp->v_vflag |= VV_OBJBUF;
return (0);
}
@@ -752,7 +751,7 @@ null_destroyvobject(struct vop_destroyvobject_args *ap)
{
struct vnode *vp = ap->a_vp;
- vp->v_vflag &= ~VV_OBJBUF;
+ vp->v_object = NULL;
return (0);
}
diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c
index 967bec3..8094b06 100644
--- a/sys/fs/unionfs/union_vnops.c
+++ b/sys/fs/unionfs/union_vnops.c
@@ -1711,9 +1711,7 @@ union_createvobject(ap)
struct thread *td;
} */ *ap;
{
- struct vnode *vp = ap->a_vp;
- vp->v_vflag |= VV_OBJBUF;
return (0);
}
@@ -1728,7 +1726,7 @@ union_destroyvobject(ap)
{
struct vnode *vp = ap->a_vp;
- vp->v_vflag &= ~VV_OBJBUF;
+ vp->v_object = NULL;
return (0);
}
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 9fc469b..f8f75d9 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -2283,7 +2283,7 @@ inmem(struct vnode * vp, daddr_t blkno)
return 1;
if (vp->v_mount == NULL)
return 0;
- if (VOP_GETVOBJECT(vp, &obj) != 0 || (vp->v_vflag & VV_OBJBUF) == 0)
+ if (VOP_GETVOBJECT(vp, &obj) != 0 || vp->v_object == NULL)
return 0;
size = PAGE_SIZE;
@@ -2608,7 +2608,7 @@ loop:
bsize = bo->bo_bsize;
offset = blkno * bsize;
vmio = (VOP_GETVOBJECT(vp, NULL) == 0) &&
- (vp->v_vflag & VV_OBJBUF);
+ vp->v_object != NULL;
maxsize = vmio ? size + (offset & PAGE_MASK) : size;
maxsize = imax(maxsize, bsize);
@@ -3229,9 +3229,8 @@ bufdone(struct buf *bp)
panic("biodone: zero vnode ref count");
}
- if ((vp->v_vflag & VV_OBJBUF) == 0) {
+ if (vp->v_object == NULL)
panic("biodone: vnode is not setup for merged cache");
- }
#endif
foff = bp->b_offset;
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c
index fc72b9c..a66c452 100644
--- a/sys/kern/vfs_default.c
+++ b/sys/kern/vfs_default.c
@@ -419,7 +419,6 @@ vop_stdcreatevobject(ap)
}
KASSERT(vp->v_object != NULL, ("vop_stdcreatevobject: NULL object"));
- vp->v_vflag |= VV_OBJBUF;
return (error);
}
@@ -549,7 +548,7 @@ loop2:
VI_UNLOCK(vp);
if ((bp->b_flags & B_DELWRI) == 0)
panic("fsync: not dirty");
- if ((vp->v_vflag & VV_OBJBUF) && (bp->b_flags & B_CLUSTEROK)) {
+ if ((vp->v_object != NULL) && (bp->b_flags & B_CLUSTEROK)) {
vfs_bio_awrite(bp);
splx(s);
} else {
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 131f853..9367fd3 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -2510,8 +2510,6 @@ vprint(label, vp)
strcat(buf, "|VI_DOOMED");
if (vp->v_iflag & VI_FREE)
strcat(buf, "|VI_FREE");
- if (vp->v_vflag & VV_OBJBUF)
- strcat(buf, "|VV_OBJBUF");
if (buf[0] != '\0')
printf(" flags (%s)", &buf[1]);
if (mtx_owned(VI_MTX(vp)))
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index dc9f67c..c90cdd1 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -224,7 +224,6 @@ struct xvnode {
#define VV_ROOT 0x0001 /* root of its filesystem */
#define VV_ISTTY 0x0002 /* vnode represents a tty */
#define VV_NOSYNC 0x0004 /* unlinked, stop syncing */
-#define VV_OBJBUF 0x0008 /* Allocate buffers in VM object */
#define VV_CACHEDLABEL 0x0010 /* Vnode has valid cached MAC label */
#define VV_TEXT 0x0020 /* vnode is a pure text prototype */
#define VV_COPYONWRITE 0x0040 /* vnode is doing copy-on-write */
diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c
index 069a43c..574cf22 100644
--- a/sys/vm/vnode_pager.c
+++ b/sys/vm/vnode_pager.c
@@ -198,7 +198,7 @@ vnode_pager_dealloc(object)
}
ASSERT_VOP_LOCKED(vp, "vnode_pager_dealloc");
vp->v_object = NULL;
- vp->v_vflag &= ~(VV_TEXT | VV_OBJBUF);
+ vp->v_vflag &= ~VV_TEXT;
}
static boolean_t
OpenPOWER on IntegriCloud