Re: [PATCH 1/2] block: add a bio_init_inline helper

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

 



On 08/09/2025 11:56, Christoph Hellwig wrote:

Reviewed-by: John Garry <john.g.garry@xxxxxxxxxx>

  void bio_init(struct bio *bio, struct block_device *bdev, struct bio_vec *table,
  	      unsigned short max_vecs, blk_opf_t opf);
+static inline void bio_init_inline(struct bio *bio, struct block_device *bdev,
+	      unsigned short max_vecs, blk_opf_t opf)
+{

I suppose that a WARN_ON(max_vecs > BIO_MAX_INLINE_VECS) could be added, but I don't think that we generally protect against such self-inflicted programming errors.

+	bio_init(bio, bdev, bio->bi_inline_vecs, max_vecs, opf);
+}
  extern void bio_uninit(struct bio *);





[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