mirror of https://github.com/schoebel/mars
if: don't rely on total_len
This commit is contained in:
parent
2633a24d67
commit
0e2b7f1445
|
@ -679,15 +679,10 @@ void if_make_request(struct request_queue *q, struct bio *bio)
|
|||
pos += this_len;
|
||||
data += this_len;
|
||||
bv_len -= this_len;
|
||||
total_len -= this_len;
|
||||
} // while bv_len > 0
|
||||
} // foreach bvec
|
||||
|
||||
if (likely(!total_len)) {
|
||||
error = 0;
|
||||
} else {
|
||||
MARS_ERR("bad rest len = %d\n", total_len);
|
||||
}
|
||||
error = 0;
|
||||
|
||||
err:
|
||||
if (error < 0) {
|
||||
|
|
Loading…
Reference in New Issue