From patchwork Wed Jan 18 09:43:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13105979 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A959EC004D4 for ; Wed, 18 Jan 2023 09:44:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 46B166B0080; Wed, 18 Jan 2023 04:44:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 41B1C6B0081; Wed, 18 Jan 2023 04:44:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 30A686B0082; Wed, 18 Jan 2023 04:44:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 2267C6B0080 for ; Wed, 18 Jan 2023 04:44:18 -0500 (EST) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id E8E651A0323 for ; Wed, 18 Jan 2023 09:44:17 +0000 (UTC) X-FDA: 80367434154.29.FF628F8 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf18.hostedemail.com (Postfix) with ESMTP id 7C91A1C0013 for ; Wed, 18 Jan 2023 09:44:16 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=U8yFVdeB; spf=none (imf18.hostedemail.com: domain of BATV+aec3eaf5b774c69d00f8+7087+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+aec3eaf5b774c69d00f8+7087+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1674035056; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=4WwjtPTvg3dbfLBE9vX5iRJAtphGCEZEkdJLVGyAJuo=; b=Q1/2+yCGy4DCvZfpFlWZcfR0QyaEVTvirdxzK6oEfIQ952MoV1z9zM5T+FYe8fK4qGIO/S EdxOEwRQwh6kDhVExitlNrAq5yFLPbrsrj5qGJS6WsoUuTAFHm6HJZDZFiupE6GQ9bXps+ uKnUGP0c3yL/BJ+5zPMyOIbv35BM1ic= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=U8yFVdeB; spf=none (imf18.hostedemail.com: domain of BATV+aec3eaf5b774c69d00f8+7087+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+aec3eaf5b774c69d00f8+7087+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1674035056; a=rsa-sha256; cv=none; b=gL33V/wmWmJUHzNcvPV6mEETDNq37mXyQWobciEHYD7ONulTNyqqvogqo1Nrf6/GDcMF3o ZfGXwALuDPksCvPCIv33C4LrjMu3GZOuReSgdU39q9RBR7t1snROzsAm1FxQffxlYt0Blq oxMKxovmtlbk6HZHzu9Ms4qR3MKgIWQ= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=4WwjtPTvg3dbfLBE9vX5iRJAtphGCEZEkdJLVGyAJuo=; b=U8yFVdeBOBI3AACbEFkiQ4355D kLv+LRYHlKEtA4P6BWETKJS4fAVkK8iUpRlBVj9bR3Z5JxNdzQrN7aBF2SXwp2ePM5gNif1cFI7cL DyUfxGZQ28zOPddZXEXlOfBeZcxkQhHcv1emVkZOzOmdX02aeXOEB1DkUHEQ2/7g4XZ+Fmx9l3UHI YMGHla2dEMTRRR/zKlZBZvvUFGurgIdckmw7tTsDDGQdh7vK99tqsGnmvLAIuksqS+qEGzkmWqgtR +53as9e9nNgosns1KccGTJVaRfjXJygIT64MdzQBaIAoGVFyt2ILegAxzv+cBLG4sjOlhTtqe7jpE HXxflEVw==; Received: from 213-147-167-250.nat.highway.webapn.at ([213.147.167.250] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pI4zI-000A8d-6U; Wed, 18 Jan 2023 09:44:09 +0000 From: Christoph Hellwig To: Andrew Morton , Matthew Wilcox , Hugh Dickins Cc: linux-afs@lists.infradead.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, cluster-devel@redhat.com, linux-mm@kvack.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-nilfs@vger.kernel.org Subject: [PATCH 7/9] gfs2: handle a NULL folio in gfs2_jhead_process_page Date: Wed, 18 Jan 2023 10:43:27 +0100 Message-Id: <20230118094329.9553-8-hch@lst.de> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230118094329.9553-1-hch@lst.de> References: <20230118094329.9553-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 7C91A1C0013 X-Stat-Signature: puk9o6w93kyfy5u43ifdnjmdj17p7tkp X-Rspam-User: X-HE-Tag: 1674035056-350003 X-HE-Meta: U2FsdGVkX1/uMkJUbnrErboywbBDzlytyEgbyKaPwwmdRJlHWttYkNlmL9id1AqQV8SuVxAe/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gSfL6IgW5UTf6rxX6oPxaEelM+K1TCTbbjoVpwLltCR4fhuUKkf1/YUqDMgMrN0SmJGJh9V4Ie4= 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: filemap_get_folio can return NULL, so exit early for that case. Signed-off-by: Christoph Hellwig --- fs/gfs2/lops.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index 1902413d5d123e..51d4b610127cdb 100644 --- a/fs/gfs2/lops.c +++ b/fs/gfs2/lops.c @@ -472,6 +472,8 @@ static void gfs2_jhead_process_page(struct gfs2_jdesc *jd, unsigned long index, struct folio *folio; folio = filemap_get_folio(jd->jd_inode->i_mapping, index); + if (!folio) + return; folio_wait_locked(folio); if (folio_test_error(folio))