From: Dan Williams <dan.j.williams@intel.com> To: axboe@kernel.dk Cc: Stephen Rothwell <sfr@canb.auug.org.au>, linux-block@vger.kernel.org, nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH] libnvdimm/pmem: Fix pmem_pagemap_cleanup compile warning Date: Tue, 08 Jun 2021 21:37:09 -0700 [thread overview] Message-ID: <162321342919.2151549.7438715629081965798.stgit@dwillia2-desk3.amr.corp.intel.com> (raw) In-Reply-To: <20210609135237.22bde319@canb.auug.org.au> 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 <sfr@canb.auug.org.au> Fixes: 80b58f4e9f4a ("libnvdimm/pmem: Fix blk_cleanup_disk() usage") Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- 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);
next parent reply other threads:[~2021-06-09 4:37 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <20210609135237.22bde319@canb.auug.org.au> 2021-06-09 4:37 ` Dan Williams [this message] 2021-06-09 15:10 ` Jens Axboe
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=162321342919.2151549.7438715629081965798.stgit@dwillia2-desk3.amr.corp.intel.com \ --to=dan.j.williams@intel.com \ --cc=axboe@kernel.dk \ --cc=linux-block@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=nvdimm@lists.linux.dev \ --cc=sfr@canb.auug.org.au \ --subject='Re: [PATCH] libnvdimm/pmem: Fix pmem_pagemap_cleanup compile warning' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).