From patchwork Wed Aug 2 08:25:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kara X-Patchwork-Id: 9876183 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6EC5C60390 for ; Wed, 2 Aug 2017 08:25:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C2042875C for ; Wed, 2 Aug 2017 08:25:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4DA9C28789; Wed, 2 Aug 2017 08:25:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D5E8B2875C for ; Wed, 2 Aug 2017 08:25:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751952AbdHBIZa (ORCPT ); Wed, 2 Aug 2017 04:25:30 -0400 Received: from mx2.suse.de ([195.135.220.15]:49490 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751066AbdHBIZa (ORCPT ); Wed, 2 Aug 2017 04:25:30 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E25D7AE55; Wed, 2 Aug 2017 08:25:28 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 4B6EA1E340C; Wed, 2 Aug 2017 10:25:28 +0200 (CEST) From: Jan Kara To: Jens Axboe Cc: , Jan Kara Subject: [PATCH] block: Add comment to submit_bio_wait() Date: Wed, 2 Aug 2017 10:25:21 +0200 Message-Id: <20170802082521.3925-1-jack@suse.cz> X-Mailer: git-send-email 2.12.3 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP submit_bio_wait() does not consume bio reference. Add comment about that. Signed-off-by: Jan Kara --- block/bio.c | 4 ++++ 1 file changed, 4 insertions(+) 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) {