OSDN Git Service

block: Add comment to submit_bio_wait()
authorJan Kara <jack@suse.cz>
Wed, 2 Aug 2017 08:25:21 +0000 (10:25 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 2 Aug 2017 14:25:04 +0000 (08:25 -0600)
submit_bio_wait() does not consume bio reference. Add comment about
that.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c

index 9a63597..e241bbc 100644 (file)
@@ -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)
 {