Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5145076pxj; Wed, 9 Jun 2021 10:08:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9WmrfzI99qJ8VaVNG4gc2e9yYFfI0MWJPcbKaOotQprzBKPrZP4+oeWklPnBzw7iJgCD3 X-Received: by 2002:aa7:c647:: with SMTP id z7mr459515edr.224.1623258488449; Wed, 09 Jun 2021 10:08:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623258488; cv=none; d=google.com; s=arc-20160816; b=UreYraI4cbFBO+GrHIcL11V+8cIr27Zguqr6KxcxMEVyPfP74b+CavDovsx4Lwc7lZ 2OrP9zJ5uPnUlbsqoy19QveOc236G78ii8cfTE9qikdafVa9ecKg9x5lue4CmuHvtqbV XqEO+bmw3G/fLZfrlyqEbtaXNZbjxGuQ3xG9TYyLukhiAq69RyysvzS1tCvdLMm+U7kq CMMqfDz/Ah509dHiBrtX+4t0JzqOo+eGSmjjD9FaSU7jvseEYteeF2oQ+hPnR0t4hAyi 3SW2FGsy6c8Lg42eAct4k6m1zyyK0H29Sgr5gcEN/SR58lkDUx5QjYRv1WGlzpU8mNRY /Mlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:ironport-sdr:ironport-sdr; bh=xoqF+i1hp40J57ZgPkGEkR35O2//abPPKpywzpC/e0w=; b=Uw52e/qM3YgZdTicOkWEDJ1f+CLoGmhLOcN6thrvjxDjTE6WPhPulfiLPc4F7YOtng M767Q8XNn5lskVfUax0HfTAiWgVYjeuGBsJ1lhzeL2m9Z3ybLHYl8o20xyXykmDlyQZo zytfWa52o6IfVehoKZ1WawpFXYVmoLK4gnMRuwlwf0MrDxhzM2PiDEbeSZipU5eKECZD uSbFxAGCwkEE9qrJkeioms73xp6SmIDpE/rRTd81wH0j/3b79GEaPTqEyFielNA5475Z bPd8Jv3GWwchCljMMQ78rASFnPTGyj9yYT5eEW9StZ29Nwk/uZ1nkf/k7b/bF1zrZRCR 5i9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nb10si304630ejc.344.2021.06.09.10.07.44; Wed, 09 Jun 2021 10:08:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233842AbhFIEjF (ORCPT + 99 others); Wed, 9 Jun 2021 00:39:05 -0400 Received: from mga03.intel.com ([134.134.136.65]:50728 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231335AbhFIEjF (ORCPT ); Wed, 9 Jun 2021 00:39:05 -0400 IronPort-SDR: eilapuEZOLwWLM6p/L+Mz7tcTBnAmyPsZYNlbf7/3WbPdapOSFvWrTotgx57p9DEzGSxp52U6E FTVsVZAquVlw== X-IronPort-AV: E=McAfee;i="6200,9189,10009"; a="205026800" X-IronPort-AV: E=Sophos;i="5.83,260,1616482800"; d="scan'208";a="205026800" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2021 21:37:09 -0700 IronPort-SDR: GtTIlozdkUHp57XpVKcomFMjONL4/eMcCqkCfAzw6RbY8Bcc56JI4KZYq20LgX6dQc3hzUheyv MnYUONbLL8Lw== X-IronPort-AV: E=Sophos;i="5.83,260,1616482800"; d="scan'208";a="552542206" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.25]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2021 21:37:09 -0700 Subject: [PATCH] libnvdimm/pmem: Fix pmem_pagemap_cleanup compile warning From: Dan Williams To: axboe@kernel.dk Cc: Stephen Rothwell , linux-block@vger.kernel.org, nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org Date: Tue, 08 Jun 2021 21:37:09 -0700 Message-ID: <162321342919.2151549.7438715629081965798.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <20210609135237.22bde319@canb.auug.org.au> References: <20210609135237.22bde319@canb.auug.org.au> User-Agent: StGit/0.18-3-g996c MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The recent fix to pmem_pagemap_cleanup() to solve a NULL pointer dereference with the queue_to_disk() helper neglected to remove the @q variable when queue_to_disk() was replaced. Drop the conversion of @pgmap to its containing 'struct request_queue' since pgmap->owner supersedes the need to reference @q. Reported-by: Stephen Rothwell Fixes: 80b58f4e9f4a ("libnvdimm/pmem: Fix blk_cleanup_disk() usage") Signed-off-by: Dan Williams --- drivers/nvdimm/pmem.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c index fc6b78dd2d24..1e0615b8565e 100644 --- a/drivers/nvdimm/pmem.c +++ b/drivers/nvdimm/pmem.c @@ -335,8 +335,6 @@ static const struct attribute_group *pmem_attribute_groups[] = { static void pmem_pagemap_cleanup(struct dev_pagemap *pgmap) { - struct request_queue *q = - container_of(pgmap->ref, struct request_queue, q_usage_counter); struct pmem_device *pmem = pgmap->owner; blk_cleanup_disk(pmem->disk);