diff options
author | sos <sos@FreeBSD.org> | 2000-02-07 23:05:40 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 2000-02-07 23:05:40 +0000 |
commit | dc230127daec112c1a3bb700232c22ac04631e88 (patch) | |
tree | e072c7f077d8cba1f690c8122a148d5cad899a12 /sys/kern/vfs_export.c | |
parent | a3a1cb67da99bf7ec2e1c0d9321f78e13d17bbc5 (diff) | |
download | FreeBSD-src-dc230127daec112c1a3bb700232c22ac04631e88.zip FreeBSD-src-dc230127daec112c1a3bb700232c22ac04631e88.tar.gz |
Do refcounting of open devices (more) correctly.
count_dev funtion by phk.
Diffstat (limited to 'sys/kern/vfs_export.c')
-rw-r--r-- | sys/kern/vfs_export.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index 06cc0d8..9120f77 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -1933,6 +1933,22 @@ vcount(vp) } /* + * Same as above, but using the dev_t as argument + */ + +int +count_dev(dev) + dev_t dev; +{ + struct vnode *vp; + + vp = SLIST_FIRST(&dev->si_hlist); + if (vp == NULL) + return (0); + return(vcount(vp)); +} + +/* * Print out a description of a vnode. */ static char *typename[] = |