ANDROID: dm-user: Remove bio recount in I/O path

When I/O is submitted to dm-user target, bio already
has a referance. Additional referance is not needed
in the I/O path.

Bug: 229696117
Test: OTA on Pixel
Change-Id: I8db6802e751336d7a10c6de0bc7a247a6d7f6b37
Signed-off-by: Akilesh Kailash <akailash@google.com>
This commit is contained in:
Akilesh Kailash
2022-11-06 20:52:29 +00:00
parent 1383c8eae9
commit 1789c47646

View File

@@ -188,7 +188,6 @@ static void message_kill(struct message *m, mempool_t *pool)
{ {
m->bio->bi_status = BLK_STS_IOERR; m->bio->bi_status = BLK_STS_IOERR;
bio_endio(m->bio); bio_endio(m->bio);
bio_put(m->bio);
mempool_free(m, pool); mempool_free(m, pool);
} }
@@ -989,7 +988,6 @@ finish_bio:
*/ */
WARN_ON(bio_size(c->cur_from_user->bio) != 0); WARN_ON(bio_size(c->cur_from_user->bio) != 0);
bio_endio(c->cur_from_user->bio); bio_endio(c->cur_from_user->bio);
bio_put(c->cur_from_user->bio);
/* /*
* We don't actually need to take the target lock here, as all * We don't actually need to take the target lock here, as all
@@ -1227,7 +1225,6 @@ static int user_map(struct dm_target *ti, struct bio *bio)
return DM_MAPIO_REQUEUE; return DM_MAPIO_REQUEUE;
} }
bio_get(bio);
entry->msg.type = bio_type_to_user_type(bio); entry->msg.type = bio_type_to_user_type(bio);
entry->msg.flags = bio_flags_to_user_flags(bio); entry->msg.flags = bio_flags_to_user_flags(bio);
entry->msg.sector = bio->bi_iter.bi_sector; entry->msg.sector = bio->bi_iter.bi_sector;