summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLiu Bo2014-04-29 07:07:58 +0200
committerChris Mason2014-06-10 02:20:25 +0200
commitd2cbf2a260ab18c833f07fda66e30c4d4344162e (patch)
tree4ff900324550fdaa1e8924cdae19f6b626e156c1 /fs
parentBtrfs: read inode size after acquiring the mutex when punching a hole (diff)
downloadkernel-qcow2-linux-d2cbf2a260ab18c833f07fda66e30c4d4344162e.tar.gz
kernel-qcow2-linux-d2cbf2a260ab18c833f07fda66e30c4d4344162e.tar.xz
kernel-qcow2-linux-d2cbf2a260ab18c833f07fda66e30c4d4344162e.zip
Btrfs: do not increment on bio_index one by one
'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>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/file-item.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c
index 127555b29f58..67751b776c7b 100644
--- a/fs/btrfs/file-item.c
+++ b/fs/btrfs/file-item.c
@@ -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++;
}
}