Kill the VV_OBJBUF and test the v_object for NULL instead.
This commit is contained in:
parent
027b1f716c
commit
35764be39e
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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 {
|
||||
|
@ -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)))
|
||||
|
@ -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 */
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user