From 1d7c598f62862ae01d5bcdfc91d4da5e61f9d952 Mon Sep 17 00:00:00 2001 From: Alexey Khoroshilov Date: Thu, 9 Aug 2012 15:19:25 +0200 Subject: [PATCH] --- yaml --- r: 322221 b: refs/heads/master c: 389d7b26d9e4f78b17366c23a3aa16b3c5cb3bde h: refs/heads/master i: 322219: 0e42c93545f5b2e8c49389f269099e18d64706b4 v: v3 --- [refs] | 2 +- trunk/fs/bio.c | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 49301d7841e6..e091038208ba 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0676806707281e27b13d44323bed580a8160b7a4 +refs/heads/master: 389d7b26d9e4f78b17366c23a3aa16b3c5cb3bde diff --git a/trunk/fs/bio.c b/trunk/fs/bio.c index 73922abba832..fed1f799cb56 100644 --- a/trunk/fs/bio.c +++ b/trunk/fs/bio.c @@ -73,7 +73,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; + struct bio_slab *bslab, *new_bio_slabs; unsigned int i, entry = -1; mutex_lock(&bio_slab_lock); @@ -97,11 +97,12 @@ static struct kmem_cache *bio_find_or_create_slab(unsigned int extra_size) if (bio_slab_nr == bio_slab_max && entry == -1) { bio_slab_max <<= 1; - bio_slabs = krealloc(bio_slabs, - bio_slab_max * sizeof(struct bio_slab), - GFP_KERNEL); - if (!bio_slabs) + new_bio_slabs = krealloc(bio_slabs, + bio_slab_max * sizeof(struct bio_slab), + GFP_KERNEL); + if (!new_bio_slabs) goto out_unlock; + bio_slabs = new_bio_slabs; } if (entry == -1) entry = bio_slab_nr++;