Merge branch 'master' into for-2.6.31
[firefly-linux-kernel-4.4.55.git] / block / blk-core.c
index 1c748403882915470df51ba0d639f881e8933b44..59c4af5231121c4c819a37b96abcc2fadbd7a7c2 100644 (file)
@@ -1935,10 +1935,10 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes)
                } else {
                        int idx = bio->bi_idx + next_idx;
 
-                       if (unlikely(bio->bi_idx >= bio->bi_vcnt)) {
+                       if (unlikely(idx >= bio->bi_vcnt)) {
                                blk_dump_rq_flags(req, "__end_that");
                                printk(KERN_ERR "%s: bio idx %d >= vcnt %d\n",
-                                      __func__, bio->bi_idx, bio->bi_vcnt);
+                                      __func__, idx, bio->bi_vcnt);
                                break;
                        }