Skip to content
Commit 3dd60fb9 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Dan Williams
Browse files

nvdimm/pmem: stop using q_usage_count as external pgmap refcount



Originally all DAX access when through block_device operations and thus
needed a queue reference.  But since commit cccbce67
("filesystem-dax: convert to dax_direct_access()") all this happens at
the DAX device level which uses its own refcounting.  Having the external
refcount thus wasn't needed but has otherwise been harmless for long
time.

But now that "block: drain file system I/O on del_gendisk" waits for
q_usage_count to reach 0 in del_gendisk this whole scheme can't work
anymore (and pmem is the only driver abusing q_usage_count like that).
So switch to the internal reference and remove the unbalanced
blk_freeze_queue_start that is taken care of by del_gendisk.

Fixes: 8e141f9e ("block: drain file system I/O on del_gendisk")
Reported-by: default avatarYi Zhang <yi.zhang@redhat.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20211019073641.2323410-2-hch@lst.de


Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 3906fe9b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment