diff options
author | kib <kib@FreeBSD.org> | 2016-01-17 08:34:35 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2016-01-17 08:34:35 +0000 |
commit | 32d7f352350a4193427528a4019067af0c735a0b (patch) | |
tree | f80763d700fb1f16afc801dbb254a231237921ca /sys/fs | |
parent | 4baa9c9a1050f0681ea5fbe03b851e51343426ad (diff) | |
download | FreeBSD-src-32d7f352350a4193427528a4019067af0c735a0b.zip FreeBSD-src-32d7f352350a4193427528a4019067af0c735a0b.tar.gz |
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
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/devfs/devfs_vnops.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index a8f3111..b147655 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -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); |