Skip to contentSkip to conversation

block: Add comment to submit_bio_wait()

PATCH In review Jan Kara 2 participants 2 messages Aug 2, 2017 Block layer

lore
Share & tools
lore

Jan Kara

author
#0 lore raw

PATCH 1/1 block: Add comment to submit_bio_wait()

submit_bio_wait() does not consume bio reference. Add comment about that.

---
 block/bio.c | 4 ++++
 1 file changed, 4 insertions(+)
block/bio.c +4 -0
index 9a63597aaacc..e241bbc49f14 100644
@@ -936,6 +936,10 @@ static void submit_bio_wait_endio(struct bio *bio)
  *
  * Simple wrapper around submit_bio(). Returns 0 on success, or the error from
  * bio_endio() on failure.
+ *
+ * WARNING: Unlike to how submit_bio() is usually used, this function does not
+ * result in bio reference to be consumed. The caller must drop the reference
+ * on his own.
  */
 int submit_bio_wait(struct bio *bio)
 {
Signature · 1 line
2.12.3
maintainer
#1 lore raw
Quoted 2 lines · Jan Kara

submit_bio_wait() does not consume bio reference. Add comment about that.

Thanks, added for 4.14.

Signature · 1 line
Jens Axboe