summaryrefslogtreecommitdiffstats
path: root/block/bio.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2017-08-02 10:25:21 +0200
committerJens Axboe <axboe@kernel.dk>2017-08-02 08:25:04 -0600
commit3d289d68823cbfe86d326400c5386feda777f092 (patch)
treefe1ad691a3454b7d7445854df3e521fc8c678a69 /block/bio.c
parentb7a71e66d4d274d627cabc17c5e41330bcf47c2d (diff)
downloadlinux-3d289d68823cbfe86d326400c5386feda777f092.tar.bz2
block: Add comment to submit_bio_wait()
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>
Diffstat (limited to 'block/bio.c')
-rw-r--r--block/bio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/block/bio.c b/block/bio.c
index 9a63597aaacc..e241bbc49f14 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -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)
{