mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
Properly test for vmio buffer in bnoreuselist().
The presence of allocated v_object does not imply that the buffer is necessary VMIO kind. Buffer might has been allocated before the object created, then the buffer is malloced. Although we try to avoid such situation, it seems to be still legitimate. Reported and tested by: pho MFC after: 1 week Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
09ed804717
commit
6c59824b31
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=342380
|
@ -1840,7 +1840,7 @@ bnoreuselist(struct bufv *bufv, struct bufobj *bo, daddr_t startn, daddr_t endn)
|
|||
* reused. Dirty buffers will have the hint applied once
|
||||
* they've been written.
|
||||
*/
|
||||
if (bp->b_vp->v_object != NULL)
|
||||
if ((bp->b_flags & B_VMIO) != 0)
|
||||
bp->b_flags |= B_NOREUSE;
|
||||
brelse(bp);
|
||||
BO_RLOCK(bo);
|
||||
|
|
Loading…
Reference in a new issue