Page MenuHomeFreeBSD

D33611.diff
No OneTemporary

D33611.diff

diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c
--- a/sys/fs/unionfs/union_vnops.c
+++ b/sys/fs/unionfs/union_vnops.c
@@ -2671,6 +2671,38 @@
return (res);
}
+static int
+unionfs_set_text(struct vop_set_text_args *ap)
+{
+ struct vnode *tvp;
+ struct unionfs_node *unp;
+ int error;
+
+ /*
+ * We assume text refs are managed against lvp/uvp through the
+ * executable mapping backed by its VM object. We therefore don't
+ * need to track leased text refs in the case of a forcible unmount.
+ */
+ unp = VTOUNIONFS(ap->a_vp);
+ ASSERT_VOP_LOCKED(ap->a_vp, __func__);
+ tvp = unp->un_uppervp != NULL ? unp->un_uppervp : unp->un_lowervp;
+ error = VOP_SET_TEXT(tvp);
+ return (error);
+}
+
+static int
+unionfs_unset_text(struct vop_unset_text_args *ap)
+{
+ struct vnode *tvp;
+ struct unionfs_node *unp;
+
+ ASSERT_VOP_LOCKED(ap->a_vp, __func__);
+ unp = VTOUNIONFS(ap->a_vp);
+ tvp = unp->un_uppervp != NULL ? unp->un_uppervp : unp->un_lowervp;
+ VOP_UNSET_TEXT_CHECKED(tvp);
+ return (0);
+}
+
struct vop_vector unionfs_vnodeops = {
.vop_default = &default_vnodeops,
@@ -2722,5 +2754,7 @@
.vop_vptofh = unionfs_vptofh,
.vop_add_writecount = unionfs_add_writecount,
.vop_vput_pair = unionfs_vput_pair,
+ .vop_set_text = unionfs_set_text,
+ .vop_unset_text = unionfs_unset_text,
};
VFS_VOP_VECTOR_REGISTER(unionfs_vnodeops);

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 25, 11:23 AM (16 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16140004
Default Alt Text
D33611.diff (1 KB)

Event Timeline