[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <yq1pmmvltea.fsf@ca-mkp.ca.oracle.com>
Date: Tue, 08 Mar 2022 22:06:52 -0500
From: "Martin K. Petersen" <martin.petersen@...cle.com>
To: Christoph Hellwig <hch@....de>
Cc: Jens Axboe <axboe@...nel.dk>, Coly Li <colyli@...e.de>,
Mike Snitzer <snitzer@...hat.com>, Song Liu <song@...nel.org>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Josef Bacik <josef@...icpanda.com>,
David Sterba <dsterba@...e.com>,
Phillip Lougher <phillip@...ashfs.org.uk>,
linux-block@...r.kernel.org, dm-devel@...hat.com,
linux-kernel@...r.kernel.org, linux-bcache@...r.kernel.org,
linux-raid@...r.kernel.org, target-devel@...r.kernel.org,
linux-btrfs@...r.kernel.org
Subject: Re: [PATCH 4/5] block: turn bio_kmalloc into a simple kmalloc wrapper
Christoph,
> Remove the magic autofree semantics and require the callers to explicitly
> call bio_init to initialize the bio.
>
> This allows bio_free to catch accidental bio_put calls on bio_init()ed
> bios as well.
> -struct bio *bio_kmalloc(gfp_t gfp_mask, unsigned short nr_iovecs);
> +struct bio *bio_kmalloc(unsigned short nr_vecs, gfp_t gfp_mask);
I understand why you did it but this parameter reversal is a bit
scary. Hopefully gfp_t will cause any mistakes to be flagged.
Reviewed-by: Martin K. Petersen <martin.petersen@...cle.com>
--
Martin K. Petersen Oracle Linux Engineering
Powered by blists - more mailing lists