svn commit: r196087 - in stable/7/sys: . contrib/pf kern
Konstantin Belousov
kib at FreeBSD.org
Sun Aug 9 11:47:41 UTC 2009
Author: kib
Date: Sun Aug 9 11:47:39 2009
New Revision: 196087
URL: http://svn.freebsd.org/changeset/base/196087
Log:
MFC r195773:
When buffer write is failed, it is wrong for brelse() to invalidate
portion of the page that was written. Among other problems, this
page might be picked up by pagedaemon, with failed assertion in
vm_pageout_flush() about validity of the page.
Modified:
stable/7/sys/ (props changed)
stable/7/sys/contrib/pf/ (props changed)
stable/7/sys/kern/vfs_bio.c
Modified: stable/7/sys/kern/vfs_bio.c
==============================================================================
--- stable/7/sys/kern/vfs_bio.c Fri Aug 7 15:41:16 2009 (r196086)
+++ stable/7/sys/kern/vfs_bio.c Sun Aug 9 11:47:39 2009 (r196087)
@@ -1347,7 +1347,8 @@ brelse(struct buf *bp)
m = bp->b_pages[i];
}
if ((bp->b_flags & B_NOCACHE) ||
- (bp->b_ioflags & BIO_ERROR)) {
+ (bp->b_ioflags & BIO_ERROR &&
+ bp->b_iocmd == BIO_READ)) {
int poffset = foff & PAGE_MASK;
int presid = resid > (PAGE_SIZE - poffset) ?
(PAGE_SIZE - poffset) : resid;
More information about the svn-src-all
mailing list