summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-01-23 22:38:38 +0000
committerjhb <jhb@FreeBSD.org>2001-01-23 22:38:38 +0000
commit24fda4f13ec981051ae684c13423bcc48885891f (patch)
treeb1b732bf476a8e17dbfc7b522ccd1884d0e797b8
parente7cd4ee72918e695c27b9c97831829b41f94273f (diff)
downloadFreeBSD-src-24fda4f13ec981051ae684c13423bcc48885891f.zip
FreeBSD-src-24fda4f13ec981051ae684c13423bcc48885891f.tar.gz
- Remove unused header include.
- Use queue macros.
-rw-r--r--sys/fs/hpfs/hpfs_hash.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/fs/hpfs/hpfs_hash.c b/sys/fs/hpfs/hpfs_hash.c
index 450711c..440d573 100644
--- a/sys/fs/hpfs/hpfs_hash.c
+++ b/sys/fs/hpfs/hpfs_hash.c
@@ -43,8 +43,6 @@
#include <sys/malloc.h>
#include <sys/proc.h>
-#include <machine/mutex.h>
-
#include <fs/hpfs/hpfs.h>
MALLOC_DEFINE(M_HPFSHASH, "HPFS hash", "HPFS node hash tables");
@@ -95,7 +93,7 @@ hpfs_hphashlookup(dev, ino)
struct hpfsnode *hp;
simple_lock(&hpfs_hphash_slock);
- for (hp = HPNOHASH(dev, ino)->lh_first; hp; hp = hp->h_hash.le_next)
+ LIST_FOREACH(hp, HPNOHASH(dev, ino), h_hash)
if (ino == hp->h_no && dev == hp->h_dev)
break;
simple_unlock(&hpfs_hphash_slock);
@@ -113,7 +111,7 @@ hpfs_hphashget(dev, ino)
loop:
simple_lock(&hpfs_hphash_slock);
- for (hp = HPNOHASH(dev, ino)->lh_first; hp; hp = hp->h_hash.le_next) {
+ LIST_FOREACH(hp, HPNOHASH(dev, ino), h_hash) {
if (ino == hp->h_no && dev == hp->h_dev) {
LOCKMGR(&hp->h_intlock, LK_EXCLUSIVE | LK_INTERLOCK, &hpfs_hphash_slock, NULL);
return (hp);
@@ -135,7 +133,7 @@ hpfs_hphashvget(dev, ino, p)
loop:
simple_lock(&hpfs_hphash_slock);
- for (hp = HPNOHASH(dev, ino)->lh_first; hp; hp = hp->h_hash.le_next) {
+ LIST_FOREACH(hp, HPNOHASH(dev, ino), h_hash) {
if (ino == hp->h_no && dev == hp->h_dev) {
vp = HPTOV(hp);
mtx_enter(&vp->v_interlock, MTX_DEF);
OpenPOWER on IntegriCloud