diff options
author | phk <phk@FreeBSD.org> | 2001-02-04 13:13:25 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2001-02-04 13:13:25 +0000 |
commit | e87f7a15ad62e1dd25061ddb301662e809692c2c (patch) | |
tree | 5f0ba9ebd57fbfd6e13f2b9403d96e9bfae48d8f /sys/fs | |
parent | f3b4fbe35f6e8e9d09f742c114281d8e9984d135 (diff) | |
download | FreeBSD-src-e87f7a15ad62e1dd25061ddb301662e809692c2c.zip FreeBSD-src-e87f7a15ad62e1dd25061ddb301662e809692c2c.tar.gz |
Mechanical change to use <sys/queue.h> macro API instead of
fondling implementation details.
Created with: sed(1)
Reviewed by: md5(1)
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/coda/coda_subr.c | 4 | ||||
-rw-r--r-- | sys/fs/fdescfs/fdesc_vnops.c | 2 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vfsops.c | 2 | ||||
-rw-r--r-- | sys/fs/ntfs/ntfs_subr.c | 10 | ||||
-rw-r--r-- | sys/fs/nullfs/null_subr.c | 2 | ||||
-rw-r--r-- | sys/fs/nwfs/nwfs_node.c | 2 | ||||
-rw-r--r-- | sys/fs/nwfs/nwfs_vfsops.c | 4 | ||||
-rw-r--r-- | sys/fs/procfs/procfs_vnops.c | 2 | ||||
-rw-r--r-- | sys/fs/umapfs/umap_subr.c | 2 | ||||
-rw-r--r-- | sys/fs/unionfs/union_vfsops.c | 4 |
10 files changed, 17 insertions, 17 deletions
diff --git a/sys/fs/coda/coda_subr.c b/sys/fs/coda/coda_subr.c index 43422a9..3fe1e18 100644 --- a/sys/fs/coda/coda_subr.c +++ b/sys/fs/coda/coda_subr.c @@ -311,10 +311,10 @@ coda_checkunmounting(mp) struct cnode *cp; int count = 0, bad = 0; loop: - for (vp = mp->mnt_vnodelist.lh_first; vp; vp = nvp) { + for (vp = LIST_FIRST(&mp->mnt_vnodelist); vp; vp = nvp) { if (vp->v_mount != mp) goto loop; - nvp = vp->v_mntvnodes.le_next; + nvp = LIST_NEXT(vp, v_mntvnodes); cp = VTOC(vp); count++; if (!(cp->c_flags & C_UNMOUNTING)) { diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index 4a8f061..c6bb2d6 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -106,7 +106,7 @@ fdesc_allocvp(ftype, ix, mp, vpp, p) fc = FD_NHASH(ix); loop: - for (fd = fc->lh_first; fd != 0; fd = fd->fd_hash.le_next) { + LIST_FOREACH(fd, fc, fd_hash) { if (fd->fd_ix == ix && fd->fd_vnode->v_mount == mp) { if (vget(fd->fd_vnode, 0, p)) goto loop; diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index 652e92b..449d691 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -769,7 +769,7 @@ msdosfs_unmount(mp, mntflags, p) printf("id %lu, mount %p, op %p\n", vp->v_id, vp->v_mount, vp->v_op); printf("freef %p, freeb %p, mount %p\n", - vp->v_freelist.tqe_next, vp->v_freelist.tqe_prev, + TAILQ_NEXT(vp, v_freelist), vp->v_freelist.tqe_prev, vp->v_mount); printf("cleanblkhd %p, dirtyblkhd %p, numoutput %ld, type %d\n", TAILQ_FIRST(&vp->v_cleanblkhd), diff --git a/sys/fs/ntfs/ntfs_subr.c b/sys/fs/ntfs/ntfs_subr.c index d9b38d4..38324f2 100644 --- a/sys/fs/ntfs/ntfs_subr.c +++ b/sys/fs/ntfs/ntfs_subr.c @@ -123,7 +123,7 @@ ntfs_findvattr(ntmp, ip, lvapp, vapp, type, name, namelen, vcn) *lvapp = NULL; *vapp = NULL; - for (vap = ip->i_valist.lh_first; vap; vap = vap->va_list.le_next) { + LIST_FOREACH(vap, &ip->i_valist, va_list) { ddprintf(("ntfs_findvattr: type: 0x%x, vcn: %d - %d\n", \ vap->va_type, (u_int32_t) vap->va_vcnstart, \ (u_int32_t) vap->va_vcnend)); @@ -452,13 +452,13 @@ ntfs_ntput(ip) dprintf(("ntfs_ntput: deallocating ntnode: %d\n", ip->i_number)); - if (ip->i_fnlist.lh_first) + if (LIST_FIRST(&ip->i_fnlist)) panic("ntfs_ntput: ntnode has fnodes\n"); ntfs_nthashrem(ip); - while (ip->i_valist.lh_first != NULL) { - vap = ip->i_valist.lh_first; + while (LIST_FIRST(&ip->i_valist) != NULL) { + vap = LIST_FIRST(&ip->i_valist); LIST_REMOVE(vap,va_list); ntfs_freentvattr(vap); } @@ -719,7 +719,7 @@ ntfs_fget( dprintf(("ntfs_fget: ino: %d, attrtype: 0x%x, attrname: %s\n", ip->i_number,attrtype, attrname?attrname:"")); *fpp = NULL; - for (fp = ip->i_fnlist.lh_first; fp != NULL; fp = fp->f_fnlist.le_next){ + LIST_FOREACH(fp, &ip->i_fnlist, f_fnlist){ dprintf(("ntfs_fget: fnode: attrtype: %d, attrname: %s\n", fp->f_attrtype, fp->f_attrname?fp->f_attrname:"")); diff --git a/sys/fs/nullfs/null_subr.c b/sys/fs/nullfs/null_subr.c index 68b0431..fe5f988 100644 --- a/sys/fs/nullfs/null_subr.c +++ b/sys/fs/nullfs/null_subr.c @@ -121,7 +121,7 @@ null_node_find(mp, lowervp) hd = NULL_NHASH(lowervp); loop: lockmgr(&null_hashlock, LK_EXCLUSIVE, NULL, p); - for (a = hd->lh_first; a != 0; a = a->null_hash.le_next) { + LIST_FOREACH(a, hd, null_hash) { if (a->null_lowervp == lowervp && NULLTOV(a)->v_mount == mp) { vp = NULLTOV(a); lockmgr(&null_hashlock, LK_RELEASE, NULL, p); diff --git a/sys/fs/nwfs/nwfs_node.c b/sys/fs/nwfs/nwfs_node.c index 885ebac..02a4ee3 100644 --- a/sys/fs/nwfs/nwfs_node.c +++ b/sys/fs/nwfs/nwfs_node.c @@ -99,7 +99,7 @@ nwfs_sysctl_vnprint(SYSCTL_HANDLER_ARGS) { printf("Name:uc:hc:fid:pfid\n"); for(i = 0; i <= nwnodehash; i++) { nhpp = &nwhashtbl[i]; - for (np = nhpp->lh_first; np != 0; np = np->n_hash.le_next) { + LIST_FOREACH(np, nhpp, n_hash) { vp = NWTOV(np); vprint(NULL, vp); printf("%s:%d:%d:%d:%d\n",np->n_name,vp->v_usecount,vp->v_holdcnt, diff --git a/sys/fs/nwfs/nwfs_vfsops.c b/sys/fs/nwfs/nwfs_vfsops.c index c0f0844..3e76b30 100644 --- a/sys/fs/nwfs/nwfs_vfsops.c +++ b/sys/fs/nwfs/nwfs_vfsops.c @@ -498,9 +498,9 @@ nwfs_sync(mp, waitfor, cred, p) * Force stale buffer cache information to be flushed. */ loop: - for (vp = mp->mnt_vnodelist.lh_first; + for (vp = LIST_FIRST(&mp->mnt_vnodelist); vp != NULL; - vp = vp->v_mntvnodes.le_next) { + vp = LIST_NEXT(vp, v_mntvnodes)) { /* * If the vnode that we are about to sync is no longer * associated with this mount point, start over. diff --git a/sys/fs/procfs/procfs_vnops.c b/sys/fs/procfs/procfs_vnops.c index 27e3707..2831966 100644 --- a/sys/fs/procfs/procfs_vnops.c +++ b/sys/fs/procfs/procfs_vnops.c @@ -875,7 +875,7 @@ procfs_readdir(ap) #ifdef PROCFS_ZOMBIE if (p == 0 && doingzomb == 0) { doingzomb = 1; - p = zombproc.lh_first; + p = LIST_FIRST(&zombproc); goto again; } #endif diff --git a/sys/fs/umapfs/umap_subr.c b/sys/fs/umapfs/umap_subr.c index a04b132..9b9806e 100644 --- a/sys/fs/umapfs/umap_subr.c +++ b/sys/fs/umapfs/umap_subr.c @@ -157,7 +157,7 @@ umap_node_find(mp, targetvp) */ hd = UMAP_NHASH(targetvp); loop: - for (a = hd->lh_first; a != 0; a = a->umap_hash.le_next) { + LIST_FOREACH(a, hd, umap_hash) { if (a->umap_lowervp == targetvp && a->umap_vnode->v_mount == mp) { vp = UMAPTOV(a); diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c index 94cba85..dfa6eae 100644 --- a/sys/fs/unionfs/union_vfsops.c +++ b/sys/fs/unionfs/union_vfsops.c @@ -337,9 +337,9 @@ union_unmount(mp, mntflags, p) int n; /* count #vnodes held on mount list */ - for (n = 0, vp = mp->mnt_vnodelist.lh_first; + for (n = 0, vp = LIST_FIRST(&mp->mnt_vnodelist); vp != NULLVP; - vp = vp->v_mntvnodes.le_next) + vp = LIST_NEXT(vp, v_mntvnodes)) n++; /* if this is unchanged then stop */ |