Message ID | 20180627124548.3456-9-ming.lei@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 3DD4660325 for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 27 Jun 2018 12:47:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DE1D28D7F for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 27 Jun 2018 12:47:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 226C128D83; Wed, 27 Jun 2018 12:47:38 +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=-2.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81B2328D7F for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 27 Jun 2018 12:47:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A0D046B0277; Wed, 27 Jun 2018 08:47:35 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 9BDFC6B0278; Wed, 27 Jun 2018 08:47:35 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 886A46B0279; Wed, 27 Jun 2018 08:47:35 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qt0-f200.google.com (mail-qt0-f200.google.com [209.85.216.200]) by kanga.kvack.org (Postfix) with ESMTP id 5CC406B0277 for <linux-mm@kvack.org>; Wed, 27 Jun 2018 08:47:35 -0400 (EDT) Received: by mail-qt0-f200.google.com with SMTP id j28-v6so1861000qtc.10 for <linux-mm@kvack.org>; Wed, 27 Jun 2018 05:47:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=M7VguFlnNMcb7aq4tHYyLtIJHTmgZIqixETJpDRjvEk=; b=pX5OFK7+APa0TkmXZB26oVc9SLK1jkJRWFo6UsoAqUlsVMzLbk8X4TnqlJAaVDduGp 81N9eIGmqF+81ULN5D/wRDPBqtQm6uOGa85FmcnkV6/SbjxUNLDhbQkwy926SS/2IytY MO8/pszMbcFAKiWtS9fpDCYTVLo7wcdKqpc2ptLRW3s6lH5xMvRBilSl5KVXd1haceUo P3sdg7ldhRAuXE0fC45McXSvrZtcXpINCeltdjEPKp2hy9a5efU9HYJZWO+4JTqJSIZa BtoGhy+0xjod8AuM7s5WNAKko35i3ElYlQz7MVlPIVXM89eFv5bb1ne5lxy2ji+YLcFw EeiA== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 66.187.233.73 as permitted sender) smtp.mailfrom=ming.lei@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Gm-Message-State: APt69E15/dorNn9y48ozQHWzzAq3ExTYbQqNgFeIlWVSnbbmjZEn6sOG t6Kjn13Cm5PJcXJA87jOHLoOnt3lS7JGDRSl/iwtVHpRvIlw1+KI9rs3ALueNKnaczE4I6E0xpk wLiEsxUCrvkN25B9/BZhqJQm5PVYBpFEv+b8C7hJSs3hWsIy/rYsPSSQwO64paDMUuQ== X-Received: by 2002:a0c:91b5:: with SMTP id n50-v6mr5190747qvn.90.1530103655190; Wed, 27 Jun 2018 05:47:35 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfju8oDFvODUels2SDMx9n0zYIiTV0iJLdoRpt3syPXJn9zOB7d+rUuDUb6eHsiEIIQL2tl X-Received: by 2002:a0c:91b5:: with SMTP id n50-v6mr5190720qvn.90.1530103654543; Wed, 27 Jun 2018 05:47:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530103654; cv=none; d=google.com; s=arc-20160816; b=svrfIlCpMdZ2ZB0o998kw3xXYTIWnHj5/cPC87zbtcJkA95GtejVSE6OffFW5dx7Vz D10pphVzyxsLSdSe8b52JHsmTSFM6CrcI56A3QLHgp2gWT+dL0SQmfllX3daoOOP6zAU qVrVLNVWxb6z/N1HeCzyQdNn68o0ePfyHD8YJV2nLCEXliY9TJPTNpmDJz3wPwVl/lN6 DmteHFlxdYGulQ2ElgaP1Et/jB4WwcColrzAzpkH8ZcnGvCThohf6lSkbtLg6VQ1jPaM P1EpJkhLHEoff5lD9D0DDXA2VmmcTC3qRKyFNCQAMgRObKl4dDhqdIAeH03HynpECeMt /Y5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=M7VguFlnNMcb7aq4tHYyLtIJHTmgZIqixETJpDRjvEk=; b=MKpxw6Y+164eGSA0ekZ8eeKMlbZogu1bAlWrdz6Lgqoc3+EFsJivra48sl4AbNJ5FM YClOaSBeJagPWMIRku0JUFMprDYCsARtC8kzd2ALlKImkuSrXYw3/AopOiwS0C6w1bk2 Vg7r1e93UfSo1/coMXIytQsvMpNT3vZ4rkxTRF3H2aPI+k3g7niTn/3YinLbeUgkadGW oMSWjOLfKDAkf43T1PVBdgFDGbvTvGShSUfKrpXc99KxSKCL7dY0szDvxKx2D5p9dUZ4 hlaZMzrKDqx71xe//BMi3/xUg1xObUkrL+HezTDhIM3UX6Lgvwrbs7DPMJfI1JFVxV2f 8HlA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 66.187.233.73 as permitted sender) smtp.mailfrom=ming.lei@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from mx1.redhat.com (mx3-rdu2.redhat.com. [66.187.233.73]) by mx.google.com with ESMTPS id a126-v6si3870717qke.337.2018.06.27.05.47.34 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jun 2018 05:47:34 -0700 (PDT) Received-SPF: pass (google.com: domain of ming.lei@redhat.com designates 66.187.233.73 as permitted sender) client-ip=66.187.233.73; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 66.187.233.73 as permitted sender) smtp.mailfrom=ming.lei@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 <ming.lei@redhat.com> To: Jens Axboe <axboe@fb.com>, Christoph Hellwig <hch@infradead.org>, Kent Overstreet <kent.overstreet@gmail.com> Cc: David Sterba <dsterba@suse.cz>, Huang Ying <ying.huang@intel.com>, Mike Snitzer <snitzer@redhat.com>, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Theodore Ts'o <tytso@mit.edu>, "Darrick J . Wong" <darrick.wong@oracle.com>, Coly Li <colyli@suse.de>, Filipe Manana <fdmanana@gmail.com>, Randy Dunlap <rdunlap@infradead.org>, Christoph Hellwig <hch@lst.de> 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:'' X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> X-Virus-Scanned: ClamAV using ClamSMTP |
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);