vtruncbuf: improve the check for meta buffer

(cherry picked from commit 2d33ad48bd)
This commit is contained in:
Konstantin Belousov 2023-12-31 22:46:53 +02:00
parent dc024acd51
commit 9e951d6b4b

View file

@ -2563,7 +2563,7 @@ vtruncbuf(struct vnode *vp, off_t length, int blksize)
*/
restartsync:
TAILQ_FOREACH_SAFE(bp, &bo->bo_dirty.bv_hd, b_bobufs, nbp) {
if (bp->b_lblkno > 0)
if (bp->b_lblkno >= 0)
continue;
/*
* Since we hold the vnode lock this should only