Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F152763850
D14613.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D14613.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D14613: Summary: Apply fixes uncovered in vfs_bio.c via static analysis.
Attached
Detach File
Event Timeline
Log In to Comment