Btrfs: do not increment on bio_index one by one
authorLiu Bo <bo.li.liu@oracle.com>
Tue, 29 Apr 2014 05:07:58 +0000 (13:07 +0800)
committerChris Mason <clm@fb.com>
Tue, 10 Jun 2014 00:20:25 +0000 (17:20 -0700)
'bio_index' is just a index, it's really not necessary to do increment
one by one.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/file-item.c

index 127555b29f587fab26de53b9a52f137f958ce3f5..67751b776c7b09960b9ccd93146b389c5374d437 100644 (file)
@@ -281,10 +281,10 @@ static int __btrfs_lookup_bio_sums(struct btrfs_root *root,
 found:
                csum += count * csum_size;
                nblocks -= count;
+               bio_index += count;
                while (count--) {
                        disk_bytenr += bvec->bv_len;
                        offset += bvec->bv_len;
-                       bio_index++;
                        bvec++;
                }
        }