Question about panic in brelse()

Christoph Mallon christoph.mallon at gmx.de
Tue Jan 20 03:54:16 PST 2009


Christoph Mallon schrieb:
> @@ -1340,7 +1340,8 @@
>          }
>          TAILQ_INSERT_HEAD(&bufqueues[bp->b_qindex], bp, b_freelist);
>      /* buffers with junk contents */
> -    } else if (bp->b_flags & (B_INVAL | B_NOCACHE | B_RELBUF) ||
> +    } else if (bp->b_flags & (B_INVAL | B_RELBUF) ||
> +        ((bp->b_flags & (B_NOCACHE | B_DELWRI)) == B_NOCACHE)
>          (bp->b_ioflags & BIO_ERROR)) {
>          bp->b_flags |= B_INVAL;
>          bp->b_xflags &= ~(BX_BKGRDWRITE | BX_ALTDATA);

I just realised that somehow a || got lost. The diff should read:

@@ -1340,7 +1340,8 @@
  		}
  		TAILQ_INSERT_HEAD(&bufqueues[bp->b_qindex], bp, b_freelist);
  	/* buffers with junk contents */
-	} else if (bp->b_flags & (B_INVAL | B_NOCACHE | B_RELBUF) ||
+	} else if (bp->b_flags & (B_INVAL | B_RELBUF) ||
+	    ((bp->b_flags & (B_NOCACHE | B_DELWRI)) == B_NOCACHE) ||
  	    (bp->b_ioflags & BIO_ERROR)) {
  		bp->b_flags |= B_INVAL;
  		bp->b_xflags &= ~(BX_BKGRDWRITE | BX_ALTDATA);


More information about the freebsd-hackers mailing list