bio: Fix outdated comment about bio_alloc_bioset()
In commit 451a9ebf65
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 <ristioja@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
6382dc3340
commit
db18efac0b
7
fs/bio.c
7
fs/bio.c
|
@ -264,13 +264,12 @@ EXPORT_SYMBOL(bio_init);
|
||||||
* bio_alloc_bioset - allocate a bio for I/O
|
* bio_alloc_bioset - allocate a bio for I/O
|
||||||
* @gfp_mask: the GFP_ mask given to the slab allocator
|
* @gfp_mask: the GFP_ mask given to the slab allocator
|
||||||
* @nr_iovecs: number of iovecs to pre-allocate
|
* @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:
|
* 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
|
* 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
|
* for a &struct bio to become free.
|
||||||
* fall back to just using @kmalloc to allocate the required memory.
|
|
||||||
*
|
*
|
||||||
* Note that the caller must set ->bi_destructor on successful return
|
* 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
|
* of a bio, to do the appropriate freeing of the bio once the reference
|
||||||
|
|
Loading…
Reference in New Issue