Date: Sun, 10 Jan 2021 02:50:02 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: ac2576b9f7bc - main - tmpfs open: assert that there is no double-init of f_data. Message-ID: <202101100250.10A2o2t2060557@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ac2576b9f7bc88b6f213141178102024705b03d3 commit ac2576b9f7bc88b6f213141178102024705b03d3 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-01-07 16:34:02 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-01-10 02:48:36 +0000 tmpfs open: assert that there is no double-init of f_data. Sponsored by: The FreeBSD Foundation --- sys/fs/tmpfs/tmpfs_vnops.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index 3c80c33ea047..90711b4849c5 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101100250.10A2o2t2060557>