Re: [PATCH 4/5] block: turn bio_kmalloc into a simple kmalloc wrapper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

-- 
Martin K. Petersen	Oracle Linux Engineering



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux