[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <df34a41a-0818-2251-9316-9a6f0c8d6ace@suse.com>
Date: Fri, 11 Jan 2019 17:07:50 +0800
From: Guoqing Jiang <gqjiang@...e.com>
To: Marcos Paulo de Souza <marcos.souza.org@...il.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Cc: shli@...nel.org, Jens Axboe <axboe@...nel.dk>
Subject: Re: [PATCH] drivers/md.c: Make bio_alloc_mddev return
bio_alloc_bioset
On 1/11/19 10:17 AM, 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@...il.com>
Add Jens to cc list, anyway, Acked-by: Guoqing Jiang <gqjiang@...e.com>
Thanks,
Guoqing
>> ---
>> 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);
>>
>> --
>> 2.16.4
>>
Powered by blists - more mailing lists