Btrfs: do not increment on bio_index one by one
diff mbox

Message ID 1398748078-5832-1-git-send-email-bo.li.liu@oracle.com
State Accepted
Headers show

Commit Message

Liu Bo April 29, 2014, 5:07 a.m. UTC
'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>
---
 fs/btrfs/file-item.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Sterba May 2, 2014, 4:13 p.m. UTC | #1
On Tue, Apr 29, 2014 at 01:07:58PM +0800, Liu Bo wrote:
> '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>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c
index 9d84658..344b89c 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++;
 		}
 	}