Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F143475610
D17999.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
880 B
Referenced Files
None
Subscribers
None
D17999.diff
View Options
Index: head/sys/kern/subr_blist.c
===================================================================
--- head/sys/kern/subr_blist.c
+++ head/sys/kern/subr_blist.c
@@ -295,9 +295,9 @@
* This loop iterates at most twice. An allocation failure in the
* first iteration leads to a second iteration only if the cursor was
* non-zero. When the cursor is zero, an allocation failure will
- * reduce the hint, stopping further iterations.
+ * stop further iterations.
*/
- while (count <= bl->bl_root->bm_bighint) {
+ for (;;) {
blk = blst_meta_alloc(bl->bl_root, bl->bl_cursor, count,
bl->bl_radix);
if (blk != SWAPBLK_NONE) {
@@ -306,10 +306,10 @@
if (bl->bl_cursor == bl->bl_blocks)
bl->bl_cursor = 0;
return (blk);
- }
+ } else if (bl->bl_cursor == 0)
+ return (SWAPBLK_NONE);
bl->bl_cursor = 0;
}
- return (SWAPBLK_NONE);
}
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 31, 5:15 PM (4 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28136951
Default Alt Text
D17999.diff (880 B)
Attached To
Mode
D17999: Avoid testing bighint in blist_alloc
Attached
Detach File
Event Timeline
Log In to Comment