Page MenuHomeFreeBSD

D14613.diff
No OneTemporary

D14613.diff

Index: head/sys/kern/vfs_bio.c
===================================================================
--- head/sys/kern/vfs_bio.c
+++ head/sys/kern/vfs_bio.c
@@ -2450,6 +2450,7 @@
void
brelse(struct buf *bp)
{
+ struct mount *v_mnt;
int qindex;
/*
@@ -2560,11 +2561,13 @@
* around to prevent it from being reconstituted and starting a second
* background write.
*/
+
+ v_mnt = bp->b_vp != NULL ? bp->b_vp->v_mount : NULL;
+
if ((bp->b_flags & B_VMIO) && (bp->b_flags & B_NOCACHE ||
(bp->b_ioflags & BIO_ERROR && bp->b_iocmd == BIO_READ)) &&
- !(bp->b_vp->v_mount != NULL &&
- (bp->b_vp->v_mount->mnt_vfc->vfc_flags & VFCF_NETWORK) != 0 &&
- !vn_isdisk(bp->b_vp, NULL) && (bp->b_flags & B_DELWRI))) {
+ (v_mnt == NULL || (v_mnt->mnt_vfc->vfc_flags & VFCF_NETWORK) == 0 ||
+ vn_isdisk(bp->b_vp, NULL) || (bp->b_flags & B_DELWRI) == 0)) {
vfs_vmio_invalidate(bp);
allocbuf(bp, 0);
}
@@ -4977,6 +4980,7 @@
object = vp->v_object;
mp = vp->v_mount;
+ error = 0;
la = IDX_TO_OFF(ma[count - 1]->pindex);
if (la >= object->un_pager.vnp.vnp_size)
return (VM_PAGER_BAD);

File Metadata

Mime Type
text/plain
Expires
Fri, Apr 17, 11:32 PM (13 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31686016
Default Alt Text
D14613.diff (1 KB)

Event Timeline