Author: kib
Date: Sun Dec 23 18:52:02 2018
New Revision: 342380
URL: https://svnweb.freebsd.org/changeset/base/342380
Log:
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
Modified:
head/sys/kern/vfs_subr.c
Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c Sun Dec 23 18:15:48 2018 (r342379)
+++ head/sys/kern/vfs_subr.c Sun Dec 23 18:52:02 2018 (r342380)
@@ -1840,7 +1840,7 @@ again:
* 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);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"