Revision b53df2e7442c73a932fb74228147fb946e531585 authored by Shin'ichiro Kawasaki on 21 February 2020, 01:37:08 UTC, committed by Jens Axboe on 12 March 2020, 13:54:39 UTC
Commit b72053072c0b ("block: allow partitions on host aware zone devices") introduced the helper function disk_has_partitions() to check if a given disk has valid partitions. However, since this function result directly depends on the disk partition table length rather than the actual existence of valid partitions in the table, it returns true even after all partitions are removed from the disk. For host aware zoned block devices, this results in zone management support to be kept disabled even after removing all partitions. Fix this by changing disk_has_partitions() to walk through the partition table entries and return true if and only if a valid non-zero size partition is found. Fixes: b72053072c0b ("block: allow partitions on host aware zone devices") Cc: stable@vger.kernel.org # 5.5 Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent cc3200e
File | Mode | Size |
---|---|---|
kasan | ||
Kconfig | -rw-r--r-- | 24.1 KB |
Kconfig.debug | -rw-r--r-- | 5.3 KB |
Makefile | -rw-r--r-- | 3.9 KB |
backing-dev.c | -rw-r--r-- | 28.5 KB |
balloon_compaction.c | -rw-r--r-- | 8.2 KB |
cleancache.c | -rw-r--r-- | 9.8 KB |
cma.c | -rw-r--r-- | 14.3 KB |
cma.h | -rw-r--r-- | 573 bytes |
cma_debug.c | -rw-r--r-- | 4.5 KB |
compaction.c | -rw-r--r-- | 74.8 KB |
debug.c | -rw-r--r-- | 6.4 KB |
debug_page_ref.c | -rw-r--r-- | 1.4 KB |
dmapool.c | -rw-r--r-- | 13.8 KB |
early_ioremap.c | -rw-r--r-- | 6.8 KB |
fadvise.c | -rw-r--r-- | 5.4 KB |
failslab.c | -rw-r--r-- | 1.4 KB |
filemap.c | -rw-r--r-- | 96.1 KB |
frame_vector.c | -rw-r--r-- | 6.5 KB |
frontswap.c | -rw-r--r-- | 14.2 KB |
gup.c | -rw-r--r-- | 70.9 KB |
gup_benchmark.c | -rw-r--r-- | 2.9 KB |
highmem.c | -rw-r--r-- | 11.7 KB |
hmm.c | -rw-r--r-- | 19.2 KB |
huge_memory.c | -rw-r--r-- | 85.1 KB |
hugetlb.c | -rw-r--r-- | 136.5 KB |
hugetlb_cgroup.c | -rw-r--r-- | 15.6 KB |
hwpoison-inject.c | -rw-r--r-- | 2.8 KB |
init-mm.c | -rw-r--r-- | 1.2 KB |
internal.h | -rw-r--r-- | 17.7 KB |
interval_tree.c | -rw-r--r-- | 3.1 KB |
khugepaged.c | -rw-r--r-- | 55.0 KB |
kmemleak-test.c | -rw-r--r-- | 2.6 KB |
kmemleak.c | -rw-r--r-- | 56.2 KB |
ksm.c | -rw-r--r-- | 89.2 KB |
list_lru.c | -rw-r--r-- | 14.6 KB |
maccess.c | -rw-r--r-- | 7.9 KB |
madvise.c | -rw-r--r-- | 28.9 KB |
mapping_dirty_helpers.c | -rw-r--r-- | 9.6 KB |
memblock.c | -rw-r--r-- | 58.3 KB |
memcontrol.c | -rw-r--r-- | 184.4 KB |
memfd.c | -rw-r--r-- | 7.9 KB |
memory-failure.c | -rw-r--r-- | 51.5 KB |
memory.c | -rw-r--r-- | 130.6 KB |
memory_hotplug.c | -rw-r--r-- | 47.0 KB |
mempolicy.c | -rw-r--r-- | 74.8 KB |
mempool.c | -rw-r--r-- | 15.8 KB |
memremap.c | -rw-r--r-- | 12.1 KB |
memtest.c | -rw-r--r-- | 2.8 KB |
migrate.c | -rw-r--r-- | 77.2 KB |
mincore.c | -rw-r--r-- | 7.6 KB |
mlock.c | -rw-r--r-- | 22.7 KB |
mm_init.c | -rw-r--r-- | 4.8 KB |
mmap.c | -rw-r--r-- | 100.0 KB |
mmu_context.c | -rw-r--r-- | 1.3 KB |
mmu_gather.c | -rw-r--r-- | 8.4 KB |
mmu_notifier.c | -rw-r--r-- | 34.2 KB |
mmzone.c | -rw-r--r-- | 2.4 KB |
mprotect.c | -rw-r--r-- | 15.5 KB |
mremap.c | -rw-r--r-- | 19.4 KB |
msync.c | -rw-r--r-- | 2.7 KB |
nommu.c | -rw-r--r-- | 45.6 KB |
oom_kill.c | -rw-r--r-- | 30.2 KB |
page-writeback.c | -rw-r--r-- | 84.8 KB |
page_alloc.c | -rw-r--r-- | 241.3 KB |
page_counter.c | -rw-r--r-- | 6.6 KB |
page_ext.c | -rw-r--r-- | 10.9 KB |
page_idle.c | -rw-r--r-- | 5.5 KB |
page_io.c | -rw-r--r-- | 10.8 KB |
page_isolation.c | -rw-r--r-- | 8.5 KB |
page_owner.c | -rw-r--r-- | 16.0 KB |
page_poison.c | -rw-r--r-- | 3.0 KB |
page_vma_mapped.c | -rw-r--r-- | 7.7 KB |
pagewalk.c | -rw-r--r-- | 14.2 KB |
percpu-internal.h | -rw-r--r-- | 6.3 KB |
percpu-km.c | -rw-r--r-- | 3.0 KB |
percpu-stats.c | -rw-r--r-- | 5.7 KB |
percpu-vm.c | -rw-r--r-- | 10.3 KB |
percpu.c | -rw-r--r-- | 91.3 KB |
pgtable-generic.c | -rw-r--r-- | 5.6 KB |
process_vm_access.c | -rw-r--r-- | 9.9 KB |
ptdump.c | -rw-r--r-- | 3.4 KB |
readahead.c | -rw-r--r-- | 16.5 KB |
rmap.c | -rw-r--r-- | 55.0 KB |
rodata_test.c | -rw-r--r-- | 1.3 KB |
shmem.c | -rw-r--r-- | 107.6 KB |
shuffle.c | -rw-r--r-- | 5.7 KB |
shuffle.h | -rw-r--r-- | 1.5 KB |
slab.c | -rw-r--r-- | 105.5 KB |
slab.h | -rw-r--r-- | 19.3 KB |
slab_common.c | -rw-r--r-- | 44.0 KB |
slob.c | -rw-r--r-- | 18.0 KB |
slub.c | -rw-r--r-- | 143.3 KB |
sparse-vmemmap.c | -rw-r--r-- | 6.9 KB |
sparse.c | -rw-r--r-- | 25.5 KB |
swap.c | -rw-r--r-- | 31.0 KB |
swap_cgroup.c | -rw-r--r-- | 5.2 KB |
swap_slots.c | -rw-r--r-- | 9.4 KB |
swap_state.c | -rw-r--r-- | 22.4 KB |
swapfile.c | -rw-r--r-- | 95.0 KB |
truncate.c | -rw-r--r-- | 26.7 KB |
usercopy.c | -rw-r--r-- | 9.5 KB |
userfaultfd.c | -rw-r--r-- | 15.7 KB |
util.c | -rw-r--r-- | 22.2 KB |
vmacache.c | -rw-r--r-- | 2.7 KB |
vmalloc.c | -rw-r--r-- | 93.4 KB |
vmpressure.c | -rw-r--r-- | 13.9 KB |
vmscan.c | -rw-r--r-- | 124.6 KB |
vmstat.c | -rw-r--r-- | 51.9 KB |
workingset.c | -rw-r--r-- | 20.5 KB |
z3fold.c | -rw-r--r-- | 46.6 KB |
zbud.c | -rw-r--r-- | 18.2 KB |
zpool.c | -rw-r--r-- | 11.2 KB |
zsmalloc.c | -rw-r--r-- | 62.0 KB |
zswap.c | -rw-r--r-- | 35.1 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...