block: fix bugs in bio-integrity mempool usage
commit0ae2b7de3957a477ec0f332c4da5633499b4d3aa
authorChuck Ebbert <cebbert@redhat.com>
Sat, 30 Jan 2010 19:28:19 +0000 (30 20:28 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 9 Feb 2010 12:50:58 +0000 (9 04:50 -0800)
treea5e57a8f53adaf86fe2c45feadf8db39e2571248
parent964814800330216ded04e5a9a21f95d7998dfd62
block: fix bugs in bio-integrity mempool usage

commit 9e9432c267e4047db98b9d4fba95099c6effcef9 upstream.

Fix two bugs in the bio integrity code:

 use_bip_pool() always returns 0 because it checks against the wrong limit,
 causing the mempool to be used only when regular allocation fails.

 When the mempool is used as a fallback we don't free the data properly.

Signed-Off-By: Chuck Ebbert <cebbert@redhat.com>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/bio-integrity.c