[Devel] [PATCH RH8 29/61] ploop: Change argument of maybe_unlink_completed_pio()
Kirill Tkhai
ktkhai at virtuozzo.com
Fri May 14 18:57:12 MSK 2021
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
drivers/md/dm-ploop-map.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index 057633854049..a61de5f934c0 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -383,18 +383,17 @@ static void maybe_link_submitting_pio(struct ploop *ploop, struct pio *h,
link_endio_hook(ploop, h, &ploop->inflight_bios_rbtree, cluster, false);
spin_unlock_irqrestore(&ploop->deferred_lock, flags);
}
-static void maybe_unlink_completed_bio(struct ploop *ploop, struct bio *bio)
+static void maybe_unlink_completed_pio(struct ploop *ploop, struct pio *pio)
{
- struct pio *h = bio_to_endio_hook(bio);
LIST_HEAD(pio_list);
unsigned long flags;
bool queue = false;
- if (likely(RB_EMPTY_NODE(&h->node)))
+ if (likely(RB_EMPTY_NODE(&pio->node)))
return;
spin_lock_irqsave(&ploop->deferred_lock, flags);
- unlink_endio_hook(ploop, &ploop->inflight_bios_rbtree, h, &pio_list);
+ unlink_endio_hook(ploop, &ploop->inflight_bios_rbtree, pio, &pio_list);
if (!list_empty(&pio_list)) {
list_splice_tail(&pio_list, &ploop->deferred_pios);
queue = true;
@@ -1701,7 +1700,7 @@ int ploop_endio(struct dm_target *ti, struct bio *bio, blk_status_t *err)
ret = ploop_discard_index_bio_end(ploop, bio);
if (ret == DM_ENDIO_DONE) {
- maybe_unlink_completed_bio(ploop, bio);
+ maybe_unlink_completed_pio(ploop, h);
dec_nr_inflight(ploop, h);
}
More information about the Devel
mailing list