Re: [RFC PATCH 3/7] block: allow to bypass bio check before submitting bio
From: Christoph Hellwig <hch@infradead.org>
Date: 2022-01-17 08:21:49
From: Christoph Hellwig <hch@infradead.org>
Date: 2022-01-17 08:21:49
* systems and other upper level users of the block layer should use
* submit_bio() instead.
*/
-void submit_bio_noacct(struct bio *bio)
+void __submit_bio_noacct(struct bio *bio, bool check)
{
- if (unlikely(!submit_bio_checks(bio)))
+ if (unlikely(check && !submit_bio_checks(bio)))
return;This doesn't make sense as an API - you can just move the checks into the caller that pass check=true. Also the lowlevel nocheck API really has no business being exported.