diff options
author | Kent Overstreet <koverstreet@google.com> | 2012-09-06 18:35:00 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2012-09-09 04:35:39 -0400 |
commit | 4254bba17d92d53822a56ebc2a0c1eb7e2a71155 (patch) | |
tree | 77668d39949a0751c5e9ef8d0fb47b96392e84e5 /Documentation | |
parent | ccc5c9ca6aac08218b1ba52afd07a1a9864c8c5d (diff) |
block: Kill bi_destructor
Now that we've got generic code for freeing bios allocated from bio
pools, this isn't needed anymore.
This patch also makes bio_free() static, since without bi_destructor
there should be no need for it to be called anywhere else.
bio_free() is now only called from bio_put, so we can refactor those a
bit - move some code from bio_put() to bio_free() and kill the redundant
bio->bi_next = NULL.
v5: Switch to BIO_KMALLOC_POOL ((void *)~0), per Boaz
v6: BIO_KMALLOC_POOL now NULL, drop bio_free's EXPORT_SYMBOL
v7: No #define BIO_KMALLOC_POOL anymore
Signed-off-by: Kent Overstreet <koverstreet@google.com>
CC: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/block/biodoc.txt | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt index e418dc0a7086..8df5e8e6dceb 100644 --- a/Documentation/block/biodoc.txt +++ b/Documentation/block/biodoc.txt | |||
@@ -465,7 +465,6 @@ struct bio { | |||
465 | bio_end_io_t *bi_end_io; /* bi_end_io (bio) */ | 465 | bio_end_io_t *bi_end_io; /* bi_end_io (bio) */ |
466 | atomic_t bi_cnt; /* pin count: free when it hits zero */ | 466 | atomic_t bi_cnt; /* pin count: free when it hits zero */ |
467 | void *bi_private; | 467 | void *bi_private; |
468 | bio_destructor_t *bi_destructor; /* bi_destructor (bio) */ | ||
469 | }; | 468 | }; |
470 | 469 | ||
471 | With this multipage bio design: | 470 | With this multipage bio design: |
@@ -647,10 +646,6 @@ for a non-clone bio. There are the 6 pools setup for different size biovecs, | |||
647 | so bio_alloc(gfp_mask, nr_iovecs) will allocate a vec_list of the | 646 | so bio_alloc(gfp_mask, nr_iovecs) will allocate a vec_list of the |
648 | given size from these slabs. | 647 | given size from these slabs. |
649 | 648 | ||
650 | The bi_destructor() routine takes into account the possibility of the bio | ||
651 | having originated from a different source (see later discussions on | ||
652 | n/w to block transfers and kvec_cb) | ||
653 | |||
654 | The bio_get() routine may be used to hold an extra reference on a bio prior | 649 | The bio_get() routine may be used to hold an extra reference on a bio prior |
655 | to i/o submission, if the bio fields are likely to be accessed after the | 650 | to i/o submission, if the bio fields are likely to be accessed after the |
656 | i/o is issued (since the bio may otherwise get freed in case i/o completion | 651 | i/o is issued (since the bio may otherwise get freed in case i/o completion |