aboutsummaryrefslogtreecommitdiffstats
path: root/fs/pnode.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-04-15 13:50:51 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-04-22 02:35:10 -0400
commit451a9ebf653d28337ba53ed5b4b70b0b9543cca1 (patch)
treeab203dfb628623483a1aeb7ead564ea35ad21d29 /fs/pnode.h
parentcd0aca2d550f238d80ba58e7dcade4ea3d0a3aa7 (diff)
bio: fix bio_kmalloc()
Impact: fix bio_kmalloc() and its destruction path bio_kmalloc() was broken in two ways. * bvec_alloc_bs() first allocates bvec using kmalloc() and then ignores it and allocates again like non-kmalloc bvecs. * bio_kmalloc_destructor() didn't check for and free bio integrity data. This patch fixes the above problems. kmalloc patch is separated out from bio_alloc_bioset() and allocates the requested number of bvecs as inline bvecs. * bio_alloc_bioset() no longer takes NULL @bs. None other than bio_kmalloc() used it and outside users can't know how it was allocated anyway. * Define and use BIO_POOL_NONE so that pool index check in bvec_free_bs() triggers if inline or kmalloc allocated bvec gets there. * Relocate destructors on top of each allocation function so that how they're used is more clear. Jens Axboe suggested allocating bvecs inline. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'fs/pnode.h')
0 files changed, 0 insertions, 0 deletions