mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
md: Make bio_alloc_mddev use bio_alloc_bioset
bio_alloc_bioset returns a bio pointer or NULL, so we can avoid storing the returned data into a new variable. Acked-by: Guoqing Jiang <[email protected]> Acked-by: Artur Paszkiewicz <[email protected]> Signed-off-by: Marcos Paulo de Souza <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
5bf859081f
commit
6251691a92
1 changed files with 1 additions and 6 deletions
|
|
@ -207,15 +207,10 @@ static bool create_on_open = true;
|
|||
struct bio *bio_alloc_mddev(gfp_t gfp_mask, int nr_iovecs,
|
||||
struct mddev *mddev)
|
||||
{
|
||||
struct bio *b;
|
||||
|
||||
if (!mddev || !bioset_initialized(&mddev->bio_set))
|
||||
return bio_alloc(gfp_mask, nr_iovecs);
|
||||
|
||||
b = bio_alloc_bioset(gfp_mask, nr_iovecs, &mddev->bio_set);
|
||||
if (!b)
|
||||
return NULL;
|
||||
return b;
|
||||
return bio_alloc_bioset(gfp_mask, nr_iovecs, &mddev->bio_set);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(bio_alloc_mddev);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue