Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153490038
D16573.id48691.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1001 B
Referenced Files
None
Subscribers
None
D16573.id48691.diff
View Options
Index: sys/kern/vfs_bio.c
===================================================================
--- sys/kern/vfs_bio.c
+++ sys/kern/vfs_bio.c
@@ -4188,6 +4188,7 @@
}
return;
}
+ newbsize = round_page(newbsize);
vm_hold_free_pages(bp, newbsize);
bufspace_adjust(bp, newbsize);
}
@@ -4219,6 +4220,8 @@
return;
}
+ newbsize = round_page(newbsize);
+
/*
* If the buffer is growing on its other-than-first
* allocation then we revert to the page-allocation
@@ -4232,7 +4235,6 @@
bp->b_data = bp->b_kvabase;
bufmallocadjust(bp, 0);
bp->b_flags &= ~B_MALLOC;
- newbsize = round_page(newbsize);
}
vm_hold_load_pages(bp, (vm_offset_t) bp->b_data + bp->b_bufsize,
(vm_offset_t) bp->b_data + newbsize);
@@ -4272,8 +4274,6 @@
newbsize = roundup2(size, DEV_BSIZE);
if ((bp->b_flags & B_VMIO) == 0) {
- if ((bp->b_flags & B_MALLOC) == 0)
- newbsize = round_page(newbsize);
/*
* Just get anonymous memory from the kernel. Don't
* mess with B_CACHE.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 22, 11:01 AM (5 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31972112
Default Alt Text
D16573.id48691.diff (1001 B)
Attached To
Mode
D16573: Fix code preventing sufficiently small buffers from being malloc buffers.
Attached
Detach File
Event Timeline
Log In to Comment