Deleted Added
full compact
ext2_vnops.c (46155) ext2_vnops.c (48225)
1/*
2 * modified for EXT2FS support in Lites 1.1
3 *
4 * Aug 1995, Godmar Back (gback@cs.utah.edu)
5 * University of Utah, Department of Computer Science
6 */
7/*
8 * Copyright (c) 1982, 1986, 1989, 1993

--- 184 unchanged lines hidden (view full) ---

193 * Flush all dirty buffers associated with a vnode.
194 */
195 ext2_discard_prealloc(VTOI(vp));
196
197loop:
198 s = splbio();
199 for (bp = TAILQ_FIRST(&vp->v_dirtyblkhd); bp; bp = nbp) {
200 nbp = TAILQ_NEXT(bp, b_vnbufs);
1/*
2 * modified for EXT2FS support in Lites 1.1
3 *
4 * Aug 1995, Godmar Back (gback@cs.utah.edu)
5 * University of Utah, Department of Computer Science
6 */
7/*
8 * Copyright (c) 1982, 1986, 1989, 1993

--- 184 unchanged lines hidden (view full) ---

193 * Flush all dirty buffers associated with a vnode.
194 */
195 ext2_discard_prealloc(VTOI(vp));
196
197loop:
198 s = splbio();
199 for (bp = TAILQ_FIRST(&vp->v_dirtyblkhd); bp; bp = nbp) {
200 nbp = TAILQ_NEXT(bp, b_vnbufs);
201 if ((bp->b_flags & B_BUSY))
201 if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT))
202 continue;
203 if ((bp->b_flags & B_DELWRI) == 0)
204 panic("ext2_fsync: not dirty");
205 bremfree(bp);
202 continue;
203 if ((bp->b_flags & B_DELWRI) == 0)
204 panic("ext2_fsync: not dirty");
205 bremfree(bp);
206 bp->b_flags |= B_BUSY;
207 splx(s);
208 /*
209 * Wait for I/O associated with indirect blocks to complete,
210 * since there is no way to quickly wait for them below.
211 */
212 if (bp->b_vp == vp || ap->a_waitfor == MNT_NOWAIT)
213 (void) bawrite(bp);
214 else

--- 1005 unchanged lines hidden ---
206 splx(s);
207 /*
208 * Wait for I/O associated with indirect blocks to complete,
209 * since there is no way to quickly wait for them below.
210 */
211 if (bp->b_vp == vp || ap->a_waitfor == MNT_NOWAIT)
212 (void) bawrite(bp);
213 else

--- 1005 unchanged lines hidden ---