Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp6310043imm; Wed, 27 Jun 2018 05:50:48 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcMue3NFRmSMK+GI5guHSsvbrOsnNfbCDq3gaiATdI777xtZ+JaEFX9UIRzbr6Oe6Rau868 X-Received: by 2002:a63:68c1:: with SMTP id d184-v6mr4968357pgc.239.1530103848184; Wed, 27 Jun 2018 05:50:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530103848; cv=none; d=google.com; s=arc-20160816; b=no4M2MK+gRG2rQw8UcKKICUnj8IOTDQE4F+cB7FTKzvRKnKzrN+tFoqMefNihBmr89 SpLy4ZiJZmHLWE1q9ZCdbV18eVbb0nvz9Ge6uk1+U990DU3mCcK49AjlJODR8gE0z5PB q/VipHzvPHKtZ9vygdVq20GsNCY3vVcdDphXoBtC7/j1iIOJoqBwWdvsjUhxu9iKbtiQ UX65cHu6nE+DkQa3Mnr8b7xmGZNXFo0HVp+VBESFRo7uyqiS3UBqFM4c1VFjO7uCR2/R pZizmPRaGiV0b/chwUA2s+4npXbj4d9taQtljXeS13C1hqF2WmwE/i4X8hFEG2lDLh6D PVog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=M7VguFlnNMcb7aq4tHYyLtIJHTmgZIqixETJpDRjvEk=; b=YveMQzVZJufQCO9/r3BPBXrWeh/LIAYxlVnpYXs4WS06OFUGkgNGOhWYmOGiLI/2Gj 2cAM0qDIcO28IpjbRCGNRtioZS1VP6BOiWXUfdJX4zqbo6UfEJO8sHdIb87cRjskyrGR RuCgEQk5IppnF7/pBu3/2AMT6p45tmMbwVkldwPVURXlWYKEk7O8bIyrJ9Zz1y8DlhEr QHHlG6cdVbqhBgjPpUJTzUQw2Tdli1RlkqIKWNx8ZZ60+IxYkgwUidSESdOlHZP0OF+B tGcnna1Yha/yevHFldxVFGCvSZlbuRLBON7khOAebl7RxXs66FmLal1ravKUmtMDmc/t wpyw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j193-v6si3345943pge.689.2018.06.27.05.50.33; Wed, 27 Jun 2018 05:50:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965197AbeF0Mrh (ORCPT + 99 others); Wed, 27 Jun 2018 08:47:37 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:39298 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S964886AbeF0Mre (ORCPT ); Wed, 27 Jun 2018 08:47:34 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 20144401EF04; Wed, 27 Jun 2018 12:47:34 +0000 (UTC) Received: from localhost (ovpn-12-44.pek2.redhat.com [10.72.12.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id 28B0111166E3; Wed, 27 Jun 2018 12:47:23 +0000 (UTC) From: Ming Lei To: Jens Axboe , Christoph Hellwig , Kent Overstreet Cc: David Sterba , Huang Ying , Mike Snitzer , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Theodore Ts'o , "Darrick J . Wong" , Coly Li , Filipe Manana , Randy Dunlap , Christoph Hellwig Subject: [PATCH V7 08/24] block: bio_set_pages_dirty can't see NULL bv_page in a valid bio_vec Date: Wed, 27 Jun 2018 20:45:32 +0800 Message-Id: <20180627124548.3456-9-ming.lei@redhat.com> In-Reply-To: <20180627124548.3456-1-ming.lei@redhat.com> References: <20180627124548.3456-1-ming.lei@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 27 Jun 2018 12:47:34 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 27 Jun 2018 12:47:34 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'ming.lei@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christoph Hellwig So don't bother handling it. Reviewed-by: Ming Lei Signed-off-by: Christoph Hellwig --- block/bio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/block/bio.c b/block/bio.c index 77f991688810..de6cbaedfb65 100644 --- a/block/bio.c +++ b/block/bio.c @@ -1557,10 +1557,8 @@ void bio_set_pages_dirty(struct bio *bio) int i; bio_for_each_segment_all(bvec, bio, i) { - struct page *page = bvec->bv_page; - - if (page && !PageCompound(page)) - set_page_dirty_lock(page); + if (!PageCompound(bvec->bv_page)) + set_page_dirty_lock(bvec->bv_page); } } EXPORT_SYMBOL_GPL(bio_set_pages_dirty); -- 2.9.5