tmpfs open: assert that there is no double-init of f_data.

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Konstantin Belousov 2021-01-07 18:34:02 +02:00
parent 9f200bc47b
commit ac2576b9f7

View File

@ -311,6 +311,7 @@ tmpfs_open(struct vop_open_args *v)
}
fp = v->a_fp;
MPASS(fp == NULL || fp->f_data == NULL);
if (error == 0 && fp != NULL && vp->v_type == VREG) {
tmpfs_ref_node(node);
finit_vnode(fp, mode, node, &tmpfs_fnops);