1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00

Assert that the linkage between struct cdev_privdata and and struct

file is consistent.

Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
This commit is contained in:
Konstantin Belousov 2016-01-17 08:34:35 +00:00
parent b60ff8405f
commit aeace3c33c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=294204

View File

@ -185,6 +185,8 @@ devfs_destroy_cdevpriv(struct cdev_privdata *p)
{
mtx_assert(&cdevpriv_mtx, MA_OWNED);
KASSERT(p->cdpd_fp->f_cdevpriv == p,
("devfs_destoy_cdevpriv %p != %p", p->cdpd_fp->f_cdevpriv, p));
p->cdpd_fp->f_cdevpriv = NULL;
LIST_REMOVE(p, cdpd_list);
mtx_unlock(&cdevpriv_mtx);