From a9715862824a44df54bbb2fe326188dacab9053a Mon Sep 17 00:00:00 2001 From: Akilesh Kailash Date: Sun, 6 Nov 2022 20:52:29 +0000 Subject: [PATCH] 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 --- drivers/md/dm-user.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/md/dm-user.c b/drivers/md/dm-user.c index f29673ccc00b..b3a4e2efb791 100644 --- a/drivers/md/dm-user.c +++ b/drivers/md/dm-user.c @@ -188,7 +188,6 @@ static void message_kill(struct message *m, mempool_t *pool) { m->bio->bi_status = BLK_STS_IOERR; bio_endio(m->bio); - bio_put(m->bio); mempool_free(m, pool); } @@ -985,7 +984,6 @@ finish_bio: */ WARN_ON(bio_size(c->cur_from_user->bio) != 0); 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 @@ -1223,7 +1221,6 @@ static int user_map(struct dm_target *ti, struct bio *bio) return DM_MAPIO_REQUEUE; } - bio_get(bio); entry->msg.type = bio_type_to_user_type(bio); entry->msg.flags = bio_flags_to_user_flags(bio); entry->msg.sector = bio->bi_iter.bi_sector;