Received: by 2002:ac0:a874:0:0:0:0:0 with SMTP id c49csp498918ima; Fri, 15 Mar 2019 07:34:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqxShXxVUxF3dsVhsQO9w4ZK+IG1Gx8OoCbJ4FuZboZPWzCGNXxrNhNRWQk+zg7+YsGE3Nrn X-Received: by 2002:a17:902:8e82:: with SMTP id bg2mr4584377plb.217.1552660458963; Fri, 15 Mar 2019 07:34:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552660458; cv=none; d=google.com; s=arc-20160816; b=U0ZP/iw38u48q2RUEVLkAW5R9c4C133KD7KJrotMP8mjR1djAP8LMr5Y4LYMZEj2EN aGRC5W6lIamlWVc6Ogy4xmn1cvommn84lFYbeeN0gBJESYm27WJwOzb9wfxvdcf1hr3v Qt5hE8uaP9NH6GflmkCEfRPQ+RV9oWyd7aeLU4SFOdMJ2mXw0UAIEjgEvCwCaRJY/adr MooHVrXLarB97XAZ3V25sMNWFocZI0FUzPwpPXMHXy38snMJ7SlyrTh9dm4sRPGLUmN1 fkWH2oNqfNYrq31M9/x7qSE3uL976J9SURxxqHEks/44etMQ3NyGtaLLopB0dMATrYq5 nggA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=PDuNZJJaM2ucli/Inxe8k/OKlaR+FNf1hjQTAhVGVvs=; b=cVWhOt1hUMHOPaB//KgZ3ZIUEGubFGy0K5hVjWFwpEB5AAdpcaufMaDKY0hiefsdhy jQKddtPSnPGTFm87Cb8SQMwNNBZsOjxrTgzFfzz8lwrePTq+MEh7B5yAtaBIW0vVzzho iEJUkLwBN5D+z6QMk9OX/HxwPBn8aVfcpFSXJ8CyXf89LSJ27tJWlp9fbOOGD/PJNKdF MkMPUaKA3h+i3diMiWt+mfYTXltWQNznGX43p7E0XGAWk3CIayHSAs6UXY4nABrt7EoJ gRjZjbt/Fr6Ih28IKwfZxtgvPCc6cS6lu6aQzt/xBwGmA+92Day1D/94iFRUvF6uO67y pEBQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o3si1955150pgh.189.2019.03.15.07.34.02; Fri, 15 Mar 2019 07:34:18 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729275AbfCOOdK (ORCPT + 99 others); Fri, 15 Mar 2019 10:33:10 -0400 Received: from charybdis-ext.suse.de ([195.135.221.2]:59941 "EHLO suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729221AbfCOOdK (ORCPT ); Fri, 15 Mar 2019 10:33:10 -0400 Received: by suse.de (Postfix, from userid 1000) id D4ADD459A; Fri, 15 Mar 2019 15:33:07 +0100 (CET) Date: Fri, 15 Mar 2019 15:33:07 +0100 From: Oscar Salvador To: Michal Hocko Cc: akpm@linux-foundation.org, anshuman.khandual@arm.com, william.kucharski@oracle.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Jan Kara , Hugh Dickins Subject: Re: [PATCH] mm: Fix __dump_page when mapping->host is not set Message-ID: <20190315143304.pkuvj4qwtlzgm7iq@d104.suse.de> References: <20190315121826.23609-1-osalvador@suse.de> <20190315124733.GE15672@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190315124733.GE15672@dhcp22.suse.cz> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 15, 2019 at 01:47:33PM +0100, Michal Hocko wrote: > diff --git a/mm/debug.c b/mm/debug.c > index 1611cf00a137..499c26d5ebe5 100644 > --- a/mm/debug.c > +++ b/mm/debug.c > @@ -78,6 +78,9 @@ void __dump_page(struct page *page, const char *reason) > else if (PageKsm(page)) > pr_warn("ksm "); > else if (mapping) { > + if (PageSwapCache(page)) > + mapping = page_swap_info(page)->swap_file->f_mapping; > + > pr_warn("%ps ", mapping->a_ops); > if (mapping->host->i_dentry.first) { > struct dentry *dentry; This looks like a much nicer fix, indeed. I gave it a spin and it works. Since the mapping is set during the swapon, I would assume that this should always work for swap. Although I am not sure if once you start playing with e.g zswap the picture can change. Let us wait for Hugh and Jan. Thanks Michal -- Oscar Salvador SUSE L3