block: simplify partition removal
authorChristoph Hellwig <hch@lst.de>
Tue, 6 Apr 2021 06:22:57 +0000 (08:22 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 8 Apr 2021 16:24:36 +0000 (10:24 -0600)
commit6c4541a8bb94a1cccca55ee53c866eb72bf279cf
treeb6cf2a625cb966c30449fd60b0cade9f6851ca19
parentc76f48eb5c084b1e15c931ae8cc1826cd771d70d
block: simplify partition removal

Always look up the first available entry instead of the complicated
stateful traversal.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210406062303.811835-7-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/partitions/core.c