Message ID | 20180609123014.8861-3-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 BDB2E601F7 for <patchwork-linux-mm@patchwork.kernel.org>; Sat, 9 Jun 2018 12:31:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE2BC223A4 for <patchwork-linux-mm@patchwork.kernel.org>; Sat, 9 Jun 2018 12:31:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A0F91223A6; Sat, 9 Jun 2018 12:31:07 +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 3E91C223A4 for <patchwork-linux-mm@patchwork.kernel.org>; Sat, 9 Jun 2018 12:31:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3CCAE6B0008; Sat, 9 Jun 2018 08:31:06 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 3545F6B000A; Sat, 9 Jun 2018 08:31:06 -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 1F58E6B000C; Sat, 9 Jun 2018 08:31:06 -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 E8EC26B0008 for <linux-mm@kvack.org>; Sat, 9 Jun 2018 08:31:05 -0400 (EDT) Received: by mail-qt0-f200.google.com with SMTP id j11-v6so14530539qtf.15 for <linux-mm@kvack.org>; Sat, 09 Jun 2018 05:31:05 -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=pqhXNJaJwyeXksH/3YtMBJpMI4RrQHoXEsi/gXf88Pw=; b=f9GmGLSFdzFG1ALljJdyxrmBTdPKqm/FfiquSWqyIVJlwdVAt3nAJgC3JHazvksIxf /sbK5BMdtjcoK7CySUxR6SJx/uQE9RLC3FMtoOmdmymUCGnO5mKHSMpTmkp8pOUKgqB+ sihOMdSFpPYBg7WFHnXoB9kIsLMwZsh06FLT46DJtBdmaqnPVnAqCqEACbA+dCwNmoqZ YPmlBqI0ifbADRdacXGR4O21FefgFzEVP9tkLdCg8RajfuOPTfC02Qeht/9H6r8b0pjU nyCnLtI1DkwQbhHkM0byLYjrxLBreJUrqSUXvfi43zTSNOlcTUrqIpt9v5DndsO6zEQl 2QxA== 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: APt69E0iuPFdPM02EP5LSwkSKCZzRiDIt9cq26Qr63uzhhkITDJ+xeuE EmT4A/8XhqKeQJMQxtgEDBn56Mfc2ZZBwJsD2EP3Dc2RsxU3yqBaC66bJ67499PH24+HKP+VNeM xTChds7sDURN2t8U3ypX9104zsTICD+tqSrJGclNC7Yab7bawrw+F+8hZuC8m8ekMgQ== X-Received: by 2002:a37:8ac3:: with SMTP id m186-v6mr8887955qkd.6.1528547465773; Sat, 09 Jun 2018 05:31:05 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ+bfPY3tm9WpLGxwMQ/jYgSClJSpVamYGofA072POFSyk7yJ1HTWgrKi6oo8HsiDucdYbl X-Received: by 2002:a37:8ac3:: with SMTP id m186-v6mr8887912qkd.6.1528547464967; Sat, 09 Jun 2018 05:31:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528547464; cv=none; d=google.com; s=arc-20160816; b=lyb0WzaXECCIYR8aXONxiDFZJFL/NPc9yEURq/fUDazl9gMEsE3g94H6uqS/obvztD kWsGO/+egZja5RhlUkxIVOe9F9Q0bC/2TaNlWJvseWqRStJcMBBWXFIKBTJAxbwxhLRY TsR7uTHQx+/V5B0mIn4Z067K+QLQWdEcLph/EAnD2HDBjBHl9+BM4z61TTh+KDIz62Pg Whd8s1HShjlOudQ6xIKnDxPbDx69V0Tzq7Yk0rgotVbiLsMmQgEvYP1uGhIq0KiIxYJR s9NMAEG7xTB7a8V+jC5R2bh9hwj8YxeydIRug5njzJzQ1WHZdMoPJgZp24MqLRRMdMo+ fxGg== 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=pqhXNJaJwyeXksH/3YtMBJpMI4RrQHoXEsi/gXf88Pw=; b=HYUSN0+Jby9CYSBRRijTtuKvaMm/5Rz/i73xfmgy27i3wv/vLnPkPtdPNBKJ1MlypW R3N2/1I13bvaEqRk3fgmoaPSGkTLAIONwiLeI8sIDW3njVuTM89ZHQhUvCGPvyl8CkHr lgSTPCb975w+aUdEhhcXYqXQry6wSdkUyKCo6Yi9bLexptEVBzini1wRgpbIFLMKDQ4N ciMiQCdFtpkQl+qojFBBa8XO6UI3mTw13FYb/rFQ1ujxImbcI4/DbuV/l9d4JmLcjMbP DzDTjzRlT0z9aHqSMy1J7A+p5w70/CZHYX02d8mp6zb3x5e0QgqtXqyvUS4lwUXMspY0 Fe1g== 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 y64-v6si1422680qvy.245.2018.06.09.05.31.04 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Jun 2018 05:31:04 -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-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 922B24187E53; Sat, 9 Jun 2018 12:31:04 +0000 (UTC) Received: from localhost (ovpn-12-40.pek2.redhat.com [10.72.12.40]) by smtp.corp.redhat.com (Postfix) with ESMTP id 60B87210C6D4; Sat, 9 Jun 2018 12:30:55 +0000 (UTC) From: Ming Lei <ming.lei@redhat.com> To: Jens Axboe <axboe@fb.com>, Christoph Hellwig <hch@infradead.org>, Alexander Viro <viro@zeniv.linux.org.uk>, Kent Overstreet <kent.overstreet@gmail.com> Cc: David Sterba <dsterba@suse.cz>, Huang Ying <ying.huang@intel.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 V6 02/30] block: bio_set_pages_dirty can't see NULL bv_page in a valid bio_vec Date: Sat, 9 Jun 2018 20:29:46 +0800 Message-Id: <20180609123014.8861-3-ming.lei@redhat.com> In-Reply-To: <20180609123014.8861-1-ming.lei@redhat.com> References: <20180609123014.8861-1-ming.lei@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Sat, 09 Jun 2018 12:31:04 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Sat, 09 Jun 2018 12:31:04 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.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 3e7d117c3346..ebd3ca62e037 100644 --- a/block/bio.c +++ b/block/bio.c @@ -1634,10 +1634,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);