aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/bio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/bio.c b/fs/bio.c
index 1f3bb501c262..8f1d2e815c96 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -1243,11 +1243,11 @@ static int __init init_bio(void)
1243 scale = 4; 1243 scale = 4;
1244 1244
1245 /* 1245 /*
1246 * scale number of entries 1246 * Limit number of entries reserved -- mempools are only used when
1247 * the system is completely unable to allocate memory, so we only
1248 * need enough to make progress.
1247 */ 1249 */
1248 bvec_pool_entries = megabytes * 2; 1250 bvec_pool_entries = 1 + scale;
1249 if (bvec_pool_entries > 256)
1250 bvec_pool_entries = 256;
1251 1251
1252 fs_bio_set = bioset_create(BIO_POOL_SIZE, bvec_pool_entries, scale); 1252 fs_bio_set = bioset_create(BIO_POOL_SIZE, bvec_pool_entries, scale);
1253 if (!fs_bio_set) 1253 if (!fs_bio_set)