From patchwork Tue Dec 27 15:55:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 9489371 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 F08FA62AAD for ; Tue, 27 Dec 2016 15:59:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D7CC0200E7 for ; Tue, 27 Dec 2016 15:59:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA4292094F; Tue, 27 Dec 2016 15:59:54 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 92718200E7 for ; Tue, 27 Dec 2016 15:59:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753456AbcL0P7w (ORCPT ); Tue, 27 Dec 2016 10:59:52 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:32860 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751294AbcL0P7v (ORCPT ); Tue, 27 Dec 2016 10:59:51 -0500 Received: by mail-pf0-f193.google.com with SMTP id 127so8374115pfg.0; Tue, 27 Dec 2016 07:58:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=r13kVEr+NJZCHJV5zLjw9cwzeIiGdcHQnK8Ss2wuVO0=; b=UXjjHi6GtcnmCQYTAcPEFe0b1Sgn3IunWq9hx+woLIab2hRS3vU83lAXy7XFNlV0Sx TuT5kY2nO8JSwVSxQUoEL40pXYzHAIWPP99lPA+bkTGR3c7eox8XDdOP0dlekPN78Y3x xXXI4O36bzO8F3Vynk4t45IWLTioyOjZyDmlZF4R6YHTeSqdiosahOQzQzPzzkzgY1rN wg8XF0EMRM7RO8R5+sEOYhQht7xU/irhYo+Lr3J1oIpM4zG7tLY8aW2CrbZXe1D36UPS NN7k6kLTIP6n3UgXUaiWPzqRBgxhuNGel/atm/B/HXJQrDBmktWkEiqQQkM7ED8AvjEU DVGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=r13kVEr+NJZCHJV5zLjw9cwzeIiGdcHQnK8Ss2wuVO0=; b=X3XLquzLzkgStbVf4y02hwY59Nvam9D1FVJQuY5t8x4fiBj7Lgu8BQFmx1IHmghcIM UxNdqiTjtTQtgSnYp2F1Ccy1W9oGFjyycX6jsoj2gPLgR9ayHaLwmk2yv9+/hICHGr0g oSLJjdG7B442gypRcdkqwj3fyEQPW3vVR1qdt83F6jdjYVTdRYj29EdXE3VGhl4ZMI53 +zfUEkEiMR0395eMsmIqcQbDZ83aiY0R7iezHjqsrzHyhOuCE/eeGsXq8l8epsjcoGqp h4237JuifR8HURfSbUnNiq52ST6j+IyANaihTdEQmQ2nSbzxkQDTuEsliTd4xRM6dKGe 4AHw== X-Gm-Message-State: AIkVDXKoafwbWZrezcLHDaOXV1R3X7cgkQ/Q6ANXKDcU6ccnqA2YFYhXdSRrpkcvRZzohg== X-Received: by 10.84.206.37 with SMTP id f34mr68203597ple.127.1482854332473; Tue, 27 Dec 2016 07:58:52 -0800 (PST) Received: from localhost ([45.35.47.137]) by smtp.gmail.com with ESMTPSA id r68sm81337334pfk.85.2016.12.27.07.58.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Dec 2016 07:58:51 -0800 (PST) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Ming Lei , Andrew Morton , Mike Christie , Michal Hocko , Minchan Kim , Joe Perches , "Kirill A. Shutemov" , linux-mm@kvack.org (open list:MEMORY MANAGEMENT) Subject: [PATCH v1 04/54] mm: page_io.c: comment on direct access to bvec table Date: Tue, 27 Dec 2016 23:55:53 +0800 Message-Id: <1482854250-13481-5-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-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Ming Lei --- mm/page_io.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/page_io.c b/mm/page_io.c index 23f6d0d3470f..368a16aa810c 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -43,6 +43,7 @@ static struct bio *get_swap_bio(gfp_t gfp_flags, void end_swap_bio_write(struct bio *bio) { + /* single page bio, safe for multipage bvec */ struct page *page = bio->bi_io_vec[0].bv_page; if (bio->bi_error) { @@ -116,6 +117,7 @@ static void swap_slot_free_notify(struct page *page) static void end_swap_bio_read(struct bio *bio) { + /* single page bio, safe for multipage bvec */ struct page *page = bio->bi_io_vec[0].bv_page; if (bio->bi_error) {