Skip to content

Commit 78ccef9

Browse files
author
Mike Snitzer
committed
dm: do not return early from dm_io_complete if BLK_STS_AGAIN without polling
Commit 5291984 ("dm: fix bio polling to handle possibile BLK_STS_AGAIN") inadvertently introduced an early return from dm_io_complete() without first queueing the bio to DM if BLK_STS_AGAIN occurs and bio-polling is _not_ being used. Fix this by only returning early from dm_io_complete() if the bio has first been properly queued to DM. Otherwise, the bio will never finish via bio_endio. Fixes: 5291984 ("dm: fix bio polling to handle possibile BLK_STS_AGAIN") Cc: [email protected] Signed-off-by: Mike Snitzer <[email protected]>
1 parent 9ae6e8b commit 78ccef9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/md/dm.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,9 +939,11 @@ static void dm_io_complete(struct dm_io *io)
939939
if (io_error == BLK_STS_AGAIN) {
940940
/* io_uring doesn't handle BLK_STS_AGAIN (yet) */
941941
queue_io(md, bio);
942+
return;
942943
}
943944
}
944-
return;
945+
if (io_error == BLK_STS_DM_REQUEUE)
946+
return;
945947
}
946948

947949
if (bio_is_flush_with_data(bio)) {

0 commit comments

Comments
 (0)