From cca0b4426216b9aadc6da07f48292074c36059d2 Mon Sep 17 00:00:00 2001 From: Chuck Ebbert Date: Sat, 30 Jan 2010 20:28:19 +0100 Subject: [PATCH] --- yaml --- r: 180165 b: refs/heads/master c: 9e9432c267e4047db98b9d4fba95099c6effcef9 h: refs/heads/master i: 180163: a3a9a925a7349dbdc90976a9a257038cedceb862 v: v3 --- [refs] | 2 +- trunk/fs/bio-integrity.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 1b9d9423d524..66d6d5995082 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1d6165851cd8e3f919d446cd6da35dee44e8837e +refs/heads/master: 9e9432c267e4047db98b9d4fba95099c6effcef9 diff --git a/trunk/fs/bio-integrity.c b/trunk/fs/bio-integrity.c index 49a34e7f7306..a16f29e888cd 100644 --- a/trunk/fs/bio-integrity.c +++ b/trunk/fs/bio-integrity.c @@ -61,7 +61,7 @@ static inline unsigned int vecs_to_idx(unsigned int nr) static inline int use_bip_pool(unsigned int idx) { - if (idx == BIOVEC_NR_POOLS) + if (idx == BIOVEC_MAX_IDX) return 1; return 0; @@ -95,6 +95,7 @@ struct bio_integrity_payload *bio_integrity_alloc_bioset(struct bio *bio, /* Use mempool if lower order alloc failed or max vecs were requested */ if (bip == NULL) { + idx = BIOVEC_MAX_IDX; /* so we free the payload properly later */ bip = mempool_alloc(bs->bio_integrity_pool, gfp_mask); if (unlikely(bip == NULL)) {