[RH7,2/2] ploop: Cleanup in ploop_make_request()

Submitted by Kirill Tkhai on Aug. 20, 2020, 1:28 p.m.

Details

Message ID 159793010197.192178.12621113866835775267.stgit@localhost.localdomain
State New
Series "Series without cover letter"
Headers show

Commit Message

Kirill Tkhai Aug. 20, 2020, 1:28 p.m.
BUG_ON(bio->bi_idx) is already checked in start of this function,
so there is no a reason to check that twise.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 drivers/block/ploop/dev.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index 25b516cad9cc..36c063b80df3 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -990,7 +990,7 @@  static void ploop_make_request(struct request_queue *q, struct bio *bio)
 		plo->st.bio_splits++;
 
 		if (!(bio->bi_rw & REQ_DISCARD))
-			BUG_ON(bio->bi_vcnt != 1 || bio->bi_idx != 0);
+			BUG_ON(bio->bi_vcnt != 1)
 
 		bp = bio_split(bio, first_sectors);
 		ploop_make_request(q, &bp->bio1);