Skip to content

Commit

Permalink
bio: Fix outdated comment about bio_alloc_bioset()
Browse files Browse the repository at this point in the history
In commit 451a9eb bio_alloc_bioset()
was refactored not to take NULL as a valid argument for bs. This patch
changes the comment for that function accordingly. Currently, passing
NULL as argument to parameter bs would result in a NULL pointer
dereference.

Signed-off-by: Jaak Ristioja <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
  • Loading branch information
Jaak Ristioja authored and Jiri Kosina committed Feb 5, 2010
1 parent 6382dc3 commit db18efa
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions fs/bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,12 @@ EXPORT_SYMBOL(bio_init);
* bio_alloc_bioset - allocate a bio for I/O
* @gfp_mask: the GFP_ mask given to the slab allocator
* @nr_iovecs: number of iovecs to pre-allocate
* @bs: the bio_set to allocate from. If %NULL, just use kmalloc
* @bs: the bio_set to allocate from.
*
* Description:
* bio_alloc_bioset will first try its own mempool to satisfy the allocation.
* bio_alloc_bioset will try its own mempool to satisfy the allocation.
* If %__GFP_WAIT is set then we will block on the internal pool waiting
* for a &struct bio to become free. If a %NULL @bs is passed in, we will
* fall back to just using @kmalloc to allocate the required memory.
* for a &struct bio to become free.
*
* Note that the caller must set ->bi_destructor on successful return
* of a bio, to do the appropriate freeing of the bio once the reference
Expand Down

0 comments on commit db18efa

Please sign in to comment.