summaryrefslogtreecommitdiff
path: root/fs/bio.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2012-12-07 12:15:33 +0100
committerIngo Molnar <mingo@kernel.org>2012-12-07 12:15:33 +0100
commit222e82bef4bd520a31d48c31ab24e49dd46daa46 (patch)
treeb6e73cad8e0b3a1c3e1acc537789e97aadaefa92 /fs/bio.c
parent38ca9c927c7d3db61f57e3d3a9334958c3af6e9a (diff)
parent18a2f371f5edf41810f6469cb9be39931ef9deb9 (diff)
Merge branch 'linus' into sched/core
Pick up the autogroups fix and other fixes. Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/bio.c')
-rw-r--r--fs/bio.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/bio.c b/fs/bio.c
index 9298c65ad9c7..b96fc6ce4855 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -75,6 +75,7 @@ static struct kmem_cache *bio_find_or_create_slab(unsigned int extra_size)
unsigned int sz = sizeof(struct bio) + extra_size;
struct kmem_cache *slab = NULL;
struct bio_slab *bslab, *new_bio_slabs;
+ unsigned int new_bio_slab_max;
unsigned int i, entry = -1;
mutex_lock(&bio_slab_lock);
@@ -97,12 +98,13 @@ static struct kmem_cache *bio_find_or_create_slab(unsigned int extra_size)
goto out_unlock;
if (bio_slab_nr == bio_slab_max && entry == -1) {
- bio_slab_max <<= 1;
+ new_bio_slab_max = bio_slab_max << 1;
new_bio_slabs = krealloc(bio_slabs,
- bio_slab_max * sizeof(struct bio_slab),
+ new_bio_slab_max * sizeof(struct bio_slab),
GFP_KERNEL);
if (!new_bio_slabs)
goto out_unlock;
+ bio_slab_max = new_bio_slab_max;
bio_slabs = new_bio_slabs;
}
if (entry == -1)