Simplify count_dev()
This commit is contained in:
parent
a96bd7843f
commit
3da2d6a453
@ -2838,12 +2838,12 @@ int
|
|||||||
count_dev(dev)
|
count_dev(dev)
|
||||||
dev_t dev;
|
dev_t dev;
|
||||||
{
|
{
|
||||||
struct vnode *vp;
|
int count;
|
||||||
|
|
||||||
vp = SLIST_FIRST(&dev->si_hlist);
|
mtx_lock(&spechash_mtx);
|
||||||
if (vp == NULL)
|
count = dev->si_usecount;
|
||||||
return (0);
|
mtx_unlock(&spechash_mtx);
|
||||||
return(vcount(vp));
|
return(count);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user