From: Jens Axboe <axboe@kernel.dk>
To: Marcos Paulo de Souza <marcos.souza.org@gmail.com>,
linux-kernel@vger.kernel.org
Cc: shli@kernel.org, linux-raid@vger.kernel.org
Subject: Re: [PATCH] drivers/md.c: Make bio_alloc_mddev return bio_alloc_bioset
Date: Mon, 14 Jan 2019 06:33:06 -0700 [thread overview]
Message-ID: <7799ad39-06e1-bbaa-fa7a-60fecb48da21@kernel.dk> (raw)
In-Reply-To: <20190111021740.GB1228567@bebop>
On 1/10/19 7:17 PM, Marcos Paulo de Souza wrote:
> ping?
>
> On Sat, Dec 22, 2018 at 08:08:45AM -0200, Marcos Paulo de Souza wrote:
>> bio_alloc_bioset return a bio pointer or NULL, so we can avoid storing
>> the returned data into a new variable.
>>
>> Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
>> ---
>> drivers/md/md.c | 7 +------
>> 1 file changed, 1 insertion(+), 6 deletions(-)
>>
>> diff --git a/drivers/md/md.c b/drivers/md/md.c
>> index fc488cb30a94..42e018f014cb 100644
>> --- a/drivers/md/md.c
>> +++ b/drivers/md/md.c
>> @@ -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);
Applied, thanks.
--
Jens Axboe
next prev parent reply other threads:[~2019-01-14 13:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-22 10:08 [PATCH] drivers/md.c: Make bio_alloc_mddev return bio_alloc_bioset Marcos Paulo de Souza
2019-01-11 2:17 ` Marcos Paulo de Souza
2019-01-11 9:07 ` Guoqing Jiang
2019-01-14 13:33 ` Jens Axboe [this message]
2019-01-14 8:39 ` Artur Paszkiewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7799ad39-06e1-bbaa-fa7a-60fecb48da21@kernel.dk \
--to=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=marcos.souza.org@gmail.com \
--cc=shli@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).