Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755728AbcL0QB2 (ORCPT ); Tue, 27 Dec 2016 11:01:28 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33937 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752721AbcL0P7v (ORCPT ); Tue, 27 Dec 2016 10:59:51 -0500 From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Ming Lei , Jens Axboe Subject: [PATCH v1 09/54] block: comment on bio_iov_iter_get_pages() Date: Tue, 27 Dec 2016 23:55:58 +0800 Message-Id: <1482854250-13481-10-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1482854250-13481-1-git-send-email-tom.leiming@gmail.com> References: <1482854250-13481-1-git-send-email-tom.leiming@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 849 Lines: 26 bio_iov_iter_get_pages() used unused bvec spaces for storing page pointer array temporarily, and this patch comments on this usage wrt. multipage bvec support. Signed-off-by: Ming Lei --- block/bio.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/block/bio.c b/block/bio.c index d4a1e0b63ea0..10398969353b 100644 --- a/block/bio.c +++ b/block/bio.c @@ -859,6 +859,10 @@ EXPORT_SYMBOL(bio_add_page); * * Pins as many pages from *iter and appends them to @bio's bvec array. The * pages will have to be released using put_page() when done. + * + * The hacking way of using bvec table as page pointer array is safe + * even after multipage bvec is introduced because that space can be + * thought as unused by bio_add_page(). */ int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter) { -- 2.7.4