diff options
author | peter <peter@FreeBSD.org> | 1998-10-31 15:31:29 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1998-10-31 15:31:29 +0000 |
commit | 8ef35acf90b37c2fc5b567eccaa3778f363d41a0 (patch) | |
tree | 1f2cdd6ce7e2fb30893bb1cea70630fd7c6edb14 /sys/msdosfs | |
parent | b7f6f55ecf024f827ab5fb630a1826c0133aab0a (diff) | |
download | FreeBSD-src-8ef35acf90b37c2fc5b567eccaa3778f363d41a0.zip FreeBSD-src-8ef35acf90b37c2fc5b567eccaa3778f363d41a0.tar.gz |
Use TAILQ macros for clean/dirty block list processing. Set b_xflags
rather than abusing the list next pointer with a magic number.
Diffstat (limited to 'sys/msdosfs')
-rw-r--r-- | sys/msdosfs/msdosfs_vfsops.c | 9 | ||||
-rw-r--r-- | sys/msdosfs/msdosfs_vnops.c | 8 |
2 files changed, 8 insertions, 9 deletions
diff --git a/sys/msdosfs/msdosfs_vfsops.c b/sys/msdosfs/msdosfs_vfsops.c index cf8f905..02ed050 100644 --- a/sys/msdosfs/msdosfs_vfsops.c +++ b/sys/msdosfs/msdosfs_vfsops.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_vfsops.c,v 1.36 1998/09/07 13:17:02 bde Exp $ */ +/* $Id: msdosfs_vfsops.c,v 1.37 1998/10/25 19:26:18 bde Exp $ */ /* $NetBSD: msdosfs_vfsops.c,v 1.51 1997/11/17 15:36:58 ws Exp $ */ /*- @@ -797,8 +797,8 @@ msdosfs_unmount(mp, mntflags, p) vp->v_freelist.tqe_next, vp->v_freelist.tqe_prev, vp->v_mount); printf("cleanblkhd %p, dirtyblkhd %p, numoutput %ld, type %d\n", - vp->v_cleanblkhd.lh_first, - vp->v_dirtyblkhd.lh_first, + TAILQ_FIRST(&vp->v_cleanblkhd), + TAILQ_FIRST(&vp->v_dirtyblkhd), vp->v_numoutput, vp->v_type); printf("union %p, tag %d, data[0] %08x, data[1] %08x\n", vp->v_socket, vp->v_tag, @@ -913,8 +913,7 @@ loop: if (vp->v_type == VNON || (dep->de_flag & (DE_ACCESS | DE_CREATE | DE_UPDATE | DE_MODIFIED)) == 0 && - (vp->v_dirtyblkhd.lh_first == NULL || - waitfor == MNT_LAZY)) { + (TAILQ_EMPTY(&vp->v_dirtyblkhd) || waitfor == MNT_LAZY)) { simple_unlock(&vp->v_interlock); continue; } diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c index c892360..f68e1bb 100644 --- a/sys/msdosfs/msdosfs_vnops.c +++ b/sys/msdosfs/msdosfs_vnops.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_vnops.c,v 1.75 1998/07/11 07:45:50 bde Exp $ */ +/* $Id: msdosfs_vnops.c,v 1.76 1998/09/13 15:39:01 dt Exp $ */ /* $NetBSD: msdosfs_vnops.c,v 1.68 1998/02/10 14:10:04 mrg Exp $ */ /*- @@ -835,8 +835,8 @@ msdosfs_fsync(ap) */ loop: s = splbio(); - for (bp = vp->v_dirtyblkhd.lh_first; bp; bp = nbp) { - nbp = bp->b_vnbufs.le_next; + for (bp = TAILQ_FIRST(&vp->v_dirtyblkhd); bp; bp = nbp) { + nbp = TAILQ_NEXT(bp, b_vnbufs); if ((bp->b_flags & B_BUSY)) continue; if ((bp->b_flags & B_DELWRI) == 0) @@ -852,7 +852,7 @@ loop: (void) tsleep((caddr_t)&vp->v_numoutput, PRIBIO + 1, "msdosfsn", 0); } #ifdef DIAGNOSTIC - if (vp->v_dirtyblkhd.lh_first) { + if (!TAILQ_EMPTY(&vp->v_dirtyblkhd)) { vprint("msdosfs_fsync: dirty", vp); goto loop; } |